Fix typo in nori docs and tests (#92336)

C샤프 in English is C#, not C++.
(C++ in Korean is C플플, C쁠쁠 or C플러스플러스.)

The translation doesn't make sense, so I changed C++ to C#.
It might be true that the writer used C샤프 as just an independent example, regardless C++, but I think it is better to align them for better understanding.
This commit is contained in:
Kiyoung's Noona 2023-01-12 07:54:44 +09:00 committed by GitHub
parent 3add0b2343
commit e535df64c5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 8 deletions

View file

@ -82,7 +82,7 @@ dictionary to `$ES_HOME/config/userdict_ko.txt`:
[source,txt]
-----------------------
c++ <1>
C샤프
C쁠쁠
세종
세종시 세종 시 <2>
-----------------------
@ -176,7 +176,7 @@ PUT nori_sample
"nori_user_dict": {
"type": "nori_tokenizer",
"decompound_mode": "mixed",
"user_dictionary_rules": ["c++", "C샤프", "세종", "세종시 세종 시"]
"user_dictionary_rules": ["c++", "C쁠쁠", "세종", "세종시 세종 시"]
}
},
"analyzer": {

View file

@ -1,5 +1,5 @@
# Additional nouns
c++
C샤프
C쁠쁠
세종
세종시 세종 시

View file

@ -75,7 +75,7 @@ public class NoriAnalysisTests extends ESTokenStreamTestCase {
public void testNoriAnalyzerUserDict() throws Exception {
Settings settings = Settings.builder()
.put("index.analysis.analyzer.my_analyzer.type", "nori")
.putList("index.analysis.analyzer.my_analyzer.user_dictionary_rules", "c++", "C샤프", "세종", "세종시 세종 시")
.putList("index.analysis.analyzer.my_analyzer.user_dictionary_rules", "c++", "C쁠쁠", "세종", "세종시 세종 시")
.build();
TestAnalysis analysis = createTestAnalysis(settings);
Analyzer analyzer = analysis.indexAnalyzers.get("my_analyzer");
@ -108,7 +108,7 @@ public class NoriAnalysisTests extends ESTokenStreamTestCase {
Settings settings = Settings.builder()
.put("index.analysis.analyzer.my_analyzer.type", "nori")
.put("index.analysis.analyzer.my_analyzer.user_dictionary", "user_dict.txt")
.putList("index.analysis.analyzer.my_analyzer.user_dictionary_rules", "c++", "C샤프", "세종", "세종시 세종 시")
.putList("index.analysis.analyzer.my_analyzer.user_dictionary_rules", "c++", "C쁠쁠", "세종", "세종시 세종 시")
.build();
IllegalArgumentException exc = expectThrows(IllegalArgumentException.class, () -> createTestAnalysis(settings));
assertThat(

View file

@ -1,5 +1,5 @@
# Additional nouns
c++
C샤프
C쁠쁠
세종
세종시 세종 시