You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Offspring of issue #85:
The documentation on ECMA/JavaScript Callbacks https://collatex.net/doc/ 6.1 is curiously short (empty, so to speak). I imagine that an argument should be given to --script (cf. 6. The Command Line Interface), e.g. an ECMA/JavaScript file with "functions to be plugged into the alignment algorithm" ... but how should these functions be ?
Karsten Kynde
The text was updated successfully, but these errors were encountered:
This is an attempt to answer my own question. I should be grateful if some authorized person would confirm, correct or - even better - complete my research - read educated guesswork:
The command line takes the option --script func.js, containing a JavaScript function
where the arguments are both string type values and the value returned is as for the Java String.compareTo().
Changes in upper- and lowercasing are by default ignored during alignment ( @rhdekker in #85 ), but if the objective is to alter this into an exact match, the above function will make no difference. This is because the arguments for compare() has already been normalized, i.e. to lower case and stripped of leading spaces. But don't panic, we can invent yet a function
function normalize( x ) {
return x ;
}
and behold, no normalization takes place. In fact, the first function compare() is now superfluous.
Offspring of issue #85:
The documentation on ECMA/JavaScript Callbacks https://collatex.net/doc/ 6.1 is curiously short (empty, so to speak). I imagine that an argument should be given to --script (cf. 6. The Command Line Interface), e.g. an ECMA/JavaScript file with "functions to be plugged into the alignment algorithm" ... but how should these functions be ?
Karsten Kynde
The text was updated successfully, but these errors were encountered: