You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by rm...@apache.org on 2022/12/21 18:28:58 UTC
[lucene] branch main updated: fix typo in BaseSynonymParserTestCase (#12030)
This is an automated email from the ASF dual-hosted git repository.
rmuir pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/lucene.git
The following commit(s) were added to refs/heads/main by this push:
new 5c78e04a178 fix typo in BaseSynonymParserTestCase (#12030)
5c78e04a178 is described below
commit 5c78e04a1788a6cf0d1c2ebae61fd579c34163a7
Author: twosom <72...@users.noreply.github.com>
AuthorDate: Thu Dec 22 03:28:52 2022 +0900
fix typo in BaseSynonymParserTestCase (#12030)
Co-authored-by: hope <ho...@gravylab.co.kr>
---
.../analysis/synonym/BaseSynonymParserTestCase.java | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/synonym/BaseSynonymParserTestCase.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/synonym/BaseSynonymParserTestCase.java
index 9cbd49df26d..cb462ddaf4f 100644
--- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/synonym/BaseSynonymParserTestCase.java
+++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/synonym/BaseSynonymParserTestCase.java
@@ -33,17 +33,17 @@ public abstract class BaseSynonymParserTestCase extends BaseTokenStreamTestCase
/**
* Helper method to validate synonym parsing.
*
- * @param synonynMap the generated synonym map after parsing
+ * @param synonymMap the generated synonym map after parsing
* @param word word (phrase) we are validating the synonyms for. Should be the value that comes
* out of the analyzer. All spaces will be replaced by word separators.
* @param includeOrig if synonyms should include original
* @param synonyms actual synonyms. All word separators are replaced with a single space.
*/
public static void assertEntryEquals(
- SynonymMap synonynMap, String word, boolean includeOrig, String[] synonyms) throws Exception {
+ SynonymMap synonymMap, String word, boolean includeOrig, String[] synonyms) throws Exception {
word = word.replace(' ', SynonymMap.WORD_SEPARATOR);
BytesRef value =
- Util.get(synonynMap.fst, Util.toUTF32(new CharsRef(word), new IntsRefBuilder()));
+ Util.get(synonymMap.fst, Util.toUTF32(new CharsRef(word), new IntsRefBuilder()));
assertNotNull("No synonyms found for: " + word, value);
ByteArrayDataInput bytesReader =
@@ -66,7 +66,7 @@ public abstract class BaseSynonymParserTestCase extends BaseTokenStreamTestCase
BytesRef scratchBytes = new BytesRef();
for (int i = 0; i < count; i++) {
- synonynMap.words.get(bytesReader.readVInt(), scratchBytes);
+ synonymMap.words.get(bytesReader.readVInt(), scratchBytes);
String synonym = scratchBytes.utf8ToString().replace(SynonymMap.WORD_SEPARATOR, ' ');
assertTrue("Unexpected synonym found: " + synonym, synonymSet.contains(synonym));
}
@@ -75,20 +75,20 @@ public abstract class BaseSynonymParserTestCase extends BaseTokenStreamTestCase
/**
* Validates that there are no synonyms for the given word.
*
- * @param synonynMap the generated synonym map after parsing
+ * @param synonymMap the generated synonym map after parsing
* @param word word (phrase) we are validating the synonyms for. Should be the value that comes
* out of the analyzer. All spaces will be replaced by word separators.
*/
- public static void assertEntryAbsent(SynonymMap synonynMap, String word) throws IOException {
+ public static void assertEntryAbsent(SynonymMap synonymMap, String word) throws IOException {
word = word.replace(' ', SynonymMap.WORD_SEPARATOR);
BytesRef value =
- Util.get(synonynMap.fst, Util.toUTF32(new CharsRef(word), new IntsRefBuilder()));
+ Util.get(synonymMap.fst, Util.toUTF32(new CharsRef(word), new IntsRefBuilder()));
assertNull("There should be no synonyms for: " + word, value);
}
public static void assertEntryEquals(
- SynonymMap synonynMap, String word, boolean includeOrig, String synonym) throws Exception {
- assertEntryEquals(synonynMap, word, includeOrig, new String[] {synonym});
+ SynonymMap synonymMap, String word, boolean includeOrig, String synonym) throws Exception {
+ assertEntryEquals(synonymMap, word, includeOrig, new String[] {synonym});
}
public static void assertAnalyzesToPositions(