Examples of lemmatize()


Examples of eu.hlavki.text.lemmagen.api.Lemmatizer.lemmatize()

    @Test
    public void testOneWord() {
        try {
            Lemmatizer lm = LemmatizerFactory.getPrebuilt("mlteast-mk");
            assertEquals("инвестиција", lm.lemmatize("инвестиции"));
        } catch (IOException e) {
            fail(e.getMessage());
        }
    }
}
View Full Code Here

Examples of eu.hlavki.text.lemmagen.api.Lemmatizer.lemmatize()

                    + "songstresses in English) need to be analyzed according to criteria "
                    + "for uncovering the underlying lexical stem.";
            String[] words = text.split("(?=[,.])|\\s+");
            for (String word : words) {
                if (word.trim().length() > 1) {
                    CharSequence lemma = lm.lemmatize(word.trim());
                    if (!word.equals(lemma)) {
                        System.out.println(word + " -> " + lemma);
                    }
                }
            }
View Full Code Here

Examples of eu.hlavki.text.lemmagen.api.Lemmatizer.lemmatize()

    @Test
    public void shortEnglishText() {
        try {
            Lemmatizer lm = LemmatizerFactory.getPrebuilt("mlteast-en");
            assertEquals("be", lm.lemmatize("are"));
            assertEquals("sing", lm.lemmatize("singing"));
        } catch (IOException e) {
            fail(e.getMessage());
        }
    }
View Full Code Here

Examples of eu.hlavki.text.lemmagen.api.Lemmatizer.lemmatize()

    @Test
    public void shortEnglishText() {
        try {
            Lemmatizer lm = LemmatizerFactory.getPrebuilt("mlteast-en");
            assertEquals("be", lm.lemmatize("are"));
            assertEquals("sing", lm.lemmatize("singing"));
        } catch (IOException e) {
            fail(e.getMessage());
        }
    }
}
View Full Code Here

Examples of eu.hlavki.text.lemmagen.api.Lemmatizer.lemmatize()

    @Test
    public void testOneWord() {
        try {
            Lemmatizer lm = LemmatizerFactory.getPrebuilt("mlteast-fa");
            assertEquals("دوست", lm.lemmatize("دوستان"));
        } catch (IOException e) {
            fail(e.getMessage());
        }
    }
}
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.