Revision: 12672
http://sourceforge.net/p/foray/code/12672
Author: victormote
Date: 2022-06-20 23:41:32 +0000 (Mon, 20 Jun 2022)
Log Message:
-----------
Fix error in test for end of for-loop.
Modified Paths:
--------------
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/PatternTree.java
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/PatternTree.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/PatternTree.java 2022-06-20 23:24:45 UTC (rev 12671)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/PatternTree.java 2022-06-20 23:41:32 UTC (rev 12672)
@@ -231,11 +231,12 @@
* However the cost of creating NodeIterator instances or managing them for reuse might be higher than the
* performance benefits gained. */
this.logger.debug("Word: {}", word.subSequence(startingWordIndex, word.length()).toString());
- for (int endingWordIndex = startingWordIndex + 1; endingWordIndex == word.length(); endingWordIndex++) {
+ for (int endingWordIndex = startingWordIndex + 1; endingWordIndex <= word.length(); endingWordIndex++) {
final int index = this.patternKeys.get(word, startingWordIndex, endingWordIndex);
if (index >= 0) {
- this.logger.debug("Pattern match: {}", word.subSequence(startingWordIndex, endingWordIndex).toString());
final byte[] values = getValues(index);
+ this.logger.debug("Pattern match: {}, values: {}",
+ word.subSequence(startingWordIndex, endingWordIndex).toString(), values);
updateInterletterValues(il, startingWordIndex, values);
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|