[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lojban] scoreGismu



de'i li 24 pi'e 04 pi'e 2010 la'o fy. tijlan .fy. cusku zoi skamyxatra.
> It doesn't always score with the same result as for an official gismu. For
> instance, the gismu with the highest score of 0.4767... in regard to the
> above source words is "mlino" according to this program, not "pilno", even
> with the older weighting:
> 
>  iun 0.36 emploi 0.21 upiog 0.16 us 0.11 primin 0.09 amal 0.07
.skamyxatra

That's because the script doesn't implement step 2b of the {gismu} creation
algorithm correctly.  This can be fixed by changing lines 114-118 from:

>    if($gismu =~ /$lcs[0].?$lcs[1]/) {
>     if($word =~ /$lcs[0].?$lcs[1]/) {
>      $score += $weight * 2 / @wordSequence;
>     }
>    }

to:

>    $score += $weight * 2 / @wordSequence
>     if $gismu =~ /$lcs[0]$lcs[1]/ && $word =~ /$lcs[0]$lcs[1]/
>     || $gismu =~ /$lcs[0].$lcs[1]/ && $word =~ /$lcs[0].$lcs[1]/

You'll also need to have an empty file in place of gismu.txt in order for
extant {gismu} (and anything they conflict with) to be considered for scoring.

mu'omi'e .kamymecraijun.

-- 
mi na se finti fi tu'a lo vi munje

-- 
You received this message because you are subscribed to the Google Groups "lojban" group.
To post to this group, send email to lojban@googlegroups.com.
To unsubscribe from this group, send email to lojban+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/lojban?hl=en.