示例#1
0
 static RomanianLemmatizer()
 {
     m_lemmatizer = new LemmatizerPrebuiltCompressed(LanguagePrebuilt.Romanian);
 }
示例#2
0
 static CzechLemmatizer()
 {
     m_lemmatizer = new LemmatizerPrebuiltCompressed(LanguagePrebuilt.Czech);
 }
示例#3
0
 static SloveneLemmatizer()
 {
     m_lemmatizer = new LemmatizerPrebuiltCompressed(LanguagePrebuilt.Slovene);
 }
示例#4
0
        public static void GetLanguageTools(Language language, out Set <string> .ReadOnly stopWords, out IStemmer stemmer)
        {
            switch (language)
            {
            case Language.Bulgarian:
                stopWords = StopWords.BulgarianStopWords;
                stemmer   = new Lemmatizer(language);
                break;

            case Language.Czech:
                stopWords = StopWords.CzechStopWords;
                stemmer   = new Lemmatizer(language);
                break;

            case Language.Danish:
                stopWords = StopWords.DanishStopWords;
                stemmer   = new Stemmer(language);
                break;

            case Language.Dutch:
                stopWords = StopWords.DutchStopWords;
                stemmer   = new Stemmer(language);
                break;

            case Language.English:
                stopWords = StopWords.EnglishStopWords;
                stemmer   = new Stemmer(language);
                break;

            case Language.Estonian:
                stopWords = null;     // *** stop words are missing
                stemmer   = new Lemmatizer(language);
                break;

            case Language.Finnish:
                stopWords = StopWords.FinnishStopWords;
                stemmer   = new Stemmer(language);
                break;

            case Language.French:
                stopWords = StopWords.FrenchStopWords;
                stemmer   = new Stemmer(language);
                break;

            case Language.German:
                stopWords = StopWords.GermanStopWords;
                stemmer   = new Stemmer(language);
                break;

            case Language.Hungarian:
                stopWords = StopWords.HungarianStopWords;
                stemmer   = new Lemmatizer(language);
                break;

            case Language.Italian:
                stopWords = StopWords.ItalianStopWords;
                stemmer   = new Stemmer(language);
                break;

            case Language.Norwegian:
                stopWords = StopWords.NorwegianStopWords;
                stemmer   = new Stemmer(language);
                break;

            case Language.Portuguese:
                stopWords = StopWords.PortugueseStopWords;
                stemmer   = new Stemmer(language);
                break;

            case Language.Romanian:
                stopWords = StopWords.RomanianStopWords;
                stemmer   = new Lemmatizer(language);
                break;

            case Language.Russian:
                stopWords = StopWords.RussianStopWords;
                stemmer   = new Stemmer(language);
                break;

            case Language.Serbian:
                stopWords = StopWords.SerbianStopWordsLatin;
                stemmer   = new Lemmatizer(language);
                break;

            case Language.Slovene:
                stopWords = StopWords.SloveneStopWords;
                stemmer   = new Lemmatizer(language);
                break;

            case Language.Spanish:
                stopWords = StopWords.SpanishStopWords;
                stemmer   = new Stemmer(language);
                break;

            case Language.Swedish:
                stopWords = StopWords.SwedishStopWords;
                stemmer   = new Stemmer(language);
                break;

            default:
                throw new ArgumentNotSupportedException("language");
            }
        }
示例#5
0
 static EnglishLemmatizer()
 {
     m_lemmatizer = new LemmatizerPrebuiltCompressed(LanguagePrebuilt.English);
 }
示例#6
0
 static HungarianLemmatizer()
 {
     m_lemmatizer = new LemmatizerPrebuiltCompressed(LanguagePrebuilt.Hungarian);
 }
示例#7
0
 static SerbianLemmatizer()
 {
     m_lemmatizer = new LemmatizerPrebuiltCompressed(LanguagePrebuilt.Serbian);
 }
示例#8
0
 static SpanishLemmatizer()
 {
     m_lemmatizer = new LemmatizerPrebuiltCompressed(LanguagePrebuilt.Spanish);
 }
示例#9
0
 static GermanLemmatizer()
 {
     m_lemmatizer = new LemmatizerPrebuiltCompressed(LanguagePrebuilt.German);
 }
示例#10
0
 static ItalianLemmatizer()
 {
     m_lemmatizer = new LemmatizerPrebuiltCompressed(LanguagePrebuilt.Italian);
 }
示例#11
0
 static EstonianLemmatizer()
 {
     m_lemmatizer = new LemmatizerPrebuiltCompressed(LanguagePrebuilt.Estonian);
 }