List of usage examples for org.apache.lucene.analysis.de GermanAnalyzer GermanAnalyzer
public GermanAnalyzer(CharArraySet stopwords)
From source file:org.eclipse.help.internal.search.AnalyzerFactory.java
License:Open Source License
public Analyzer create() { if (locale == null) return null; Version version = Version.LUCENE_35; if ("pt".equals(locale)) //$NON-NLS-1$ return new BrazilianAnalyzer(version); if ("ja".equals(locale)) //$NON-NLS-1$ return new CJKAnalyzer(version); if ("ko".equals(locale)) //$NON-NLS-1$ return new CJKAnalyzer(version); if ("pt".equals(locale)) //$NON-NLS-1$ return new BrazilianAnalyzer(version); if ("cs".equals(locale)) //$NON-NLS-1$ return new CzechAnalyzer(version); if ("de".equals(locale)) //$NON-NLS-1$ return new GermanAnalyzer(version); if ("el".equals(locale)) //$NON-NLS-1$ return new GreekAnalyzer(version); if ("fr".equals(locale)) //$NON-NLS-1$ return new FrenchAnalyzer(version); if ("nl".equals(locale)) //$NON-NLS-1$ return new DutchAnalyzer(version); if ("ru".equals(locale)) //$NON-NLS-1$ return new RussianAnalyzer(version); //unknown language return null;//from w w w . jav a 2 s . c om }
From source file:org.lucenerevolution.AnalyzerExampleTest.java
License:Apache License
@Test public void testGermanAnalysis() throws IOException { String german = "Das Oktoberfest ist das grte Volksfest der Welt und es findet in der bayerischen Landeshauptstadt Mnchen."; printer.printTerms(new GermanAnalyzer(Version.LUCENE_42), german); }
From source file:perLucene.Server.java
License:Open Source License
private static void initAnalyzers() { ha = new HashMap<String, Analyzer>(); ha.put("ar", new ArabicAnalyzer(Version.LUCENE_41)); ha.put("el", new GreekAnalyzer(Version.LUCENE_41)); ha.put("bg", new BulgarianAnalyzer(Version.LUCENE_41)); ha.put("br", new BrazilianAnalyzer(Version.LUCENE_41)); ha.put("ca", new CatalanAnalyzer(Version.LUCENE_41)); ha.put("cz", new CzechAnalyzer(Version.LUCENE_41)); ha.put("da", new DanishAnalyzer(Version.LUCENE_41)); ha.put("de", new GermanAnalyzer(Version.LUCENE_41)); ha.put("en", new EnglishAnalyzer(Version.LUCENE_41)); ha.put("es", new SpanishAnalyzer(Version.LUCENE_41)); ha.put("eu", new BasqueAnalyzer(Version.LUCENE_41)); ha.put("fa", new PersianAnalyzer(Version.LUCENE_41)); ha.put("fi", new FinnishAnalyzer(Version.LUCENE_41)); ha.put("fr", new FrenchAnalyzer(Version.LUCENE_41)); ha.put("ga", new IrishAnalyzer(Version.LUCENE_41)); ha.put("gl", new GalicianAnalyzer(Version.LUCENE_41)); ha.put("hi", new HindiAnalyzer(Version.LUCENE_41)); ha.put("hu", new HungarianAnalyzer(Version.LUCENE_41)); ha.put("hy", new ArmenianAnalyzer(Version.LUCENE_41)); ha.put("id", new IndonesianAnalyzer(Version.LUCENE_41)); ha.put("it", new ItalianAnalyzer(Version.LUCENE_41)); ha.put("lv", new LatvianAnalyzer(Version.LUCENE_41)); ha.put("nl", new DutchAnalyzer(Version.LUCENE_41)); ha.put("no", new NorwegianAnalyzer(Version.LUCENE_41)); ha.put("pt", new PortugueseAnalyzer(Version.LUCENE_41)); ha.put("ro", new RomanianAnalyzer(Version.LUCENE_41)); ha.put("ru", new RussianAnalyzer(Version.LUCENE_41)); ha.put("sv", new SwedishAnalyzer(Version.LUCENE_41)); ha.put("th", new ThaiAnalyzer(Version.LUCENE_41)); ha.put("tr", new TurkishAnalyzer(Version.LUCENE_41)); ha.put("cn", new SmartChineseAnalyzer(Version.LUCENE_41)); }