@Test public void testDummyFactoryContextGenerator() throws Exception { LanguageDetectorContextGenerator cg = model.getFactory().getContextGenerator(); String[] context = cg.getContext( "a dummy text phrase to test if the context generator works!!!!!!!!!!!!"); Set<String> set = new HashSet(Arrays.asList(context)); Assert.assertTrue(set.contains("!!!!!")); Assert.assertTrue(set.contains("a dum")); Assert.assertTrue(set.contains("tg=[THE,CONTEXT,GENERATOR]")); }
public LanguageDetectorContextGenerator getContextGenerator() { return new DefaultLanguageDetectorContextGenerator(1, 3, EmojiCharSequenceNormalizer.getInstance(), UrlCharSequenceNormalizer.getInstance(), TwitterCharSequenceNormalizer.getInstance(), NumberCharSequenceNormalizer.getInstance(), ShrinkCharSequenceNormalizer.getInstance()); }
LanguageDetectorFactory extends BaseToolFactory { public LanguageDetectorContextGenerator getContextGenerator() { return new DefaultLanguageDetectorContextGenerator(1, 3, EmojiCharSequenceNormalizer.getInstance(), UrlCharSequenceNormalizer.getInstance(), TwitterCharSequenceNormalizer.getInstance(), NumberCharSequenceNormalizer.getInstance(), ShrinkCharSequenceNormalizer.getInstance()); } }
LanguageDetectorFactory extends BaseToolFactory { public LanguageDetectorContextGenerator getContextGenerator() { return new DefaultLanguageDetectorContextGenerator(1, 3, EmojiCharSequenceNormalizer.getInstance(), UrlCharSequenceNormalizer.getInstance(), TwitterCharSequenceNormalizer.getInstance(), NumberCharSequenceNormalizer.getInstance(), ShrinkCharSequenceNormalizer.getInstance()); }  }
LanguageDetectorFactory extends BaseToolFactory { public LanguageDetectorContextGenerator getContextGenerator() { return new DefaultLanguageDetectorContextGenerator(1, 3, EmojiCharSequenceNormalizer.getInstance(), UrlCharSequenceNormalizer.getInstance(), TwitterCharSequenceNormalizer.getInstance(), NumberCharSequenceNormalizer.getInstance(), ShrinkCharSequenceNormalizer.getInstance()); }  LanguageDetectorContextGenerator getContextGenerator(); static LanguageDetectorFactory create(String subclassName); void init(); @Override void validateArtifactMap(); }
LanguageDetectorFactory extends BaseToolFactory { public LanguageDetectorContextGenerator getContextGenerator() { return new DefaultLanguageDetectorContextGenerator(1, 3, EmojiCharSequenceNormalizer.getInstance(), UrlCharSequenceNormalizer.getInstance(), TwitterCharSequenceNormalizer.getInstance(), NumberCharSequenceNormalizer.getInstance(), ShrinkCharSequenceNormalizer.getInstance()); }  LanguageDetectorContextGenerator getContextGenerator(); static LanguageDetectorFactory create(String subclassName); void init(); @Override void validateArtifactMap();  }