W dniu 2013-04-23 16:28, Jaume Ortolà i Font pisze:
> 2013/4/23 Marcin Miłkowski <[email protected] <mailto:[email protected]>>
>
>>     We need to reach the separator, stop increasing the depth, and
>>     then we have to substitute the separator with other possible
>>     characters.
>
>     We don't have to substitute anything, the separator is set by the
>     .info file (or left as '+' by default).
>
>
> I was thinking of the process of searching candidates and why
> isBeforeSeparator doesn't work. We need to reach the separator depth,
> then we discard the word as a candidate, stop increasing depth, but
> continue checking candidates with different characters at the same depth.

Hm, you are right. We simply need to reject the candidate that includes 
the separator char. Also, we should do it only if the dictionary really 
has separators, so:

if (!fsa.isArcTerminal(arc)
               && !(containsSeparators && candidate[depth] == (char) 
dictionaryMetadata.separator)) {
             findRepl(depth + 1, fsa.getEndNode(arc), new 
byte[0],correctionCandidate,correctionWord);
           }

> Let me know if there is any problem. I will do more testing.

Good. I think the only outstanding problem is how to represent 
replacements in the .info file. This is a Java property file, so we need 
to find some elegant notation to put multiple replacements on the same line.

Regards,
Marcin

------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
_______________________________________________
Languagetool-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/languagetool-devel

Reply via email to