Skip to content

Commit c388a4b

Browse files
committed
Dic refactoring
1 parent 634fcce commit c388a4b

17 files changed

Lines changed: 14798 additions & 19838 deletions

File tree

analysis/src/java/com/github/oeuvres/alix/lucene/analysis/fr/FrenchAnalyzer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public FrenchAnalyzer() throws IOException
8888
{
8989
super(PER_FIELD_REUSE_STRATEGY);
9090
stopwords = new CharArraySet(500, false);
91-
normalizer = FrenchLexicons.buildWordNormalizer();
91+
normalizer = FrenchLexicons.buildNormalizer();
9292
LexiconHelper.loadSet(stopwords, getClass(), "/com/github/oeuvres/alix/fr/stop.csv");
9393
lemmaLexicon = FrenchLexicons.buildLemmaLexicon();
9494

analysis/src/java/com/github/oeuvres/alix/lucene/analysis/fr/FrenchLexicons.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,20 +49,22 @@ private FrenchLexicons()
4949
{
5050
}
5151

52-
public static CharArraySet buildBrevidot() throws IOException
52+
public static CharArraySet buildBrevidot()
5353
{
5454
// set ignore case
5555
CharArraySet map = new CharArraySet(100, true);
5656
LexiconHelper.loadSet(map, LexiconHelper.class, "/com/github/oeuvres/alix/fr/brevidot.csv", 0, LexiconHelper.CsvHeader.SKIP, ".");
5757
return map;
5858
}
5959

60-
public static CharArrayMap<char[]> buildWordNormalizer()
60+
public static CharArrayMap<char[]> buildNormalizer()
6161
{
6262
CharArrayMap<char[]> map = new CharArrayMap<char[]>(2000, false);
63-
LexiconHelper.loadMap(map, LexiconHelper.class, "/com/github/oeuvres/alix/fr/norm.csv", LexiconHelper.OnDuplicate.REPLACE);
6463
LexiconHelper.loadMap(map, LexiconHelper.class, "/com/github/oeuvres/alix/fr/norm-1990-classical.csv", LexiconHelper.OnDuplicate.REPLACE);
6564
LexiconHelper.loadMap(map, LexiconHelper.class, "/com/github/oeuvres/alix/fr/norm-aeoe.csv", LexiconHelper.OnDuplicate.REPLACE);
65+
LexiconHelper.loadMap(map, LexiconHelper.class, "/com/github/oeuvres/alix/fr/norm-maj-noacc.csv", LexiconHelper.OnDuplicate.REPLACE);
66+
LexiconHelper.loadMap(map, LexiconHelper.class, "/com/github/oeuvres/alix/fr/norm-names.csv", LexiconHelper.OnDuplicate.REPLACE);
67+
LexiconHelper.loadMap(map, LexiconHelper.class, "/com/github/oeuvres/alix/fr/norm-misc.csv", LexiconHelper.OnDuplicate.REPLACE);
6668
return map;
6769
}
6870

0 commit comments

Comments
 (0)