W dniu 2013-04-23 15:21, Jaume Ortolà i Font pisze:
2013/4/23 Marcin Miłkowski <[email protected] <mailto:[email protected]>>

    > If that's the case, then it's a bug in traversing the dictionary.
    Yes, you were right. OK, then it's a bug. I need to use
    isBeforeSeparator() more often. Probably in line 313 of Speller.java,
    instead of:

    if (!fsa.isArcTerminal(arc)) {

    we should have:

    if (!(fsa.isArcTerminal(arc) || isBeforeSeparator(arc))) {

    could you confirm if that fixes your problem?


I tried this before, and it didn't fix the problem. What fixes the problem is:

if (!fsa.isArcTerminal(arc) && !(candidate[depth] == (char) dictionaryMetadata.separator)) {

I wrote the same condition a few lines before (see the Speller.java file I sent). So the second appearance is unnecessary.

OK, good. I will try to integrate your idea with new properties and see how it works in general.

Overall, the list of substitutions might be simply a map<String,String> (I'm not sure if we want multiple substitutions for the same string, if yes, then a list).

I'm not exactly sure if your code would accommodate automatically any list of substitutions of any length.

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).

Best,
Marcin


Best,
Jaume



------------------------------------------------------------------------------
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

------------------------------------------------------------------------------
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