G'MIC - GREYC's Magic for Image Computing: A Full-Featured Open-Source Framework for Image Processing
Banner Institutions GREYC CNRS ENSICAEN UNICAEN

A Full-Featured Open-Source Framework for Image Processing



Latest stable version: 4.0.4 (2026/08/19)

Reference
Table of Contents  ▸  List of Commands  ▸  Reptorian's Commands  ▸  rep_sug_args◀  rep_uniq_args    |    rep_local_files  ▶

rep_sug_args

Arguments:

  • inp,_sep,_sug_mul_args={ 0=false | 1=true},10<_sim_res[%]<=100,-100<=_leven_jaro_blend[%]<=100,_exp>0,0<=_prefix_sw_blend[%]<=100,0<=_prefix_sw_factor[%]<=100,0<=_prefix_boost[%]<=100,_case_insensitive={ 0=false | 1=true },_split_sep,arg0,arg1,...

Description:

Suggest arguments given input using a hybrid of Jaro-Winkler and Levenshtein fuzzy matching, blended against a prefix/Smith-Waterman score.

 
Returns --0001e0 on exact match.
Returns --0000e0 if no close match is found.
 
Note: For --0001e0 and --0000e0. They're intended to be that way to avoid conflict with 0 or 1. So, keep in mind these are meant to be treated as vector to be validated.
 
Returns suggestion when close matches are found.
 
Errors when no valid input for argN is found.
 
Developers notes: _EXAM_SIM variable can be defined before executing rep_sug_args to debug. This controls how many entries to print out.
 
Parameters
#--------------------------------------------------#
inp is the input word to compare against the list of arguments.
_sep is the separator between words (defaults to an empty string '').
_sug_mul_args : 1 = Multiple suggestions, 0 = Only the closest match.
_sim_res defines the minimum similarity score for a match to be accepted.
_leven_jaro_blend sets mix of two fuzzy-match options. [1][2][3][4][5]*
_exp scales the similarity score (default: 1).
_prefix_sw_blend set mix of prefix and smith-waterman algorithm.
_prefix_sw_factor defines how much to boost the prefix/smith-waterman scoring.
_prefix_boost defines how much to boost similarity using prefix.
_case_insensitive defines whether the algorithm is case-insensitive.
_split_sep is the delimiter to split along argNs.
argN is a list of words to compare the input against. Also, when split_sep is active, the perceived arguments actually is dependent on split_sep.
#--------------------------------------------------#
 
[1] -1         : Alt Jaro-Winkler only
[2] -1<value<0 : Mix Levenshtein and alt Jaro-Winkler.
[3] 0          : Levenshtein only
[4] 0<value<1  : Mix Levenshtein and standard Jaro-Winkler.
[5] 1          : Standard Jaro-Winkler only
 
Closer to -1 or 1 favors selected Jaro-Winkler variant. Positive value favors more forgiving Jaro-Winkler variant.
 

Default values:

_sep=,_sug_mul_args=1,_sim_res=70%,_leven_jaro_blend=50%,_exp=1,_prefix_sw_blend=0%,_prefix_sw_factor=5%,_prefix_boost=50%,_case_insensitive=1,_split_sep='

G'MIC - GREYC's Magic for Image Computing: A Full-Featured Open-Source Framework for Image Processing

G'MIC is an open-source software distributed under the CeCILL free software licenses (LGPL-like and/or
GPL-compatible). Copyrights (C) Since July 2008, David Tschumperlé - GREYC UMR CNRS 6072, Image Team.