Codota Logo
ConfigurablePOSContextGenerator
Code IndexAdd Codota to your IDE (free)

How to use
ConfigurablePOSContextGenerator
in
opennlp.tools.postag

Best Java code snippets using opennlp.tools.postag.ConfigurablePOSContextGenerator (Showing top 4 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Point p =
  • Codota Iconnew Point(x, y)
  • Codota Iconnew Point()
  • Codota IconMouseEvent e;e.getPoint()
  • Smart code suggestions by Codota
}
origin: apache/opennlp

private void testContextGeneration(int cacheSize) {
 AdaptiveFeatureGenerator fg = new TokenFeatureGenerator();
 ConfigurablePOSContextGenerator cg = new ConfigurablePOSContextGenerator(cacheSize, fg);
 String[] tokens = new String[] {"a", "b", "c", "d", "e"};
 String[] tags = new String[] {"t_a", "t_b", "t_c", "t_d", "t_e"};
 cg.getContext(0, tokens, tags, null);
 Assert.assertEquals(1, cg.getContext(0, tokens, tags, null).length);
 Assert.assertEquals("w=a", cg.getContext(0, tokens, tags, null)[0]);
 Assert.assertEquals("w=b", cg.getContext(1, tokens, tags, null)[0]);
 Assert.assertEquals("w=c", cg.getContext(2, tokens, tags, null)[0]);
 Assert.assertEquals("w=d", cg.getContext(3, tokens, tags, null)[0]);
 Assert.assertEquals("w=e", cg.getContext(4, tokens, tags, null)[0]);
}
origin: apache/opennlp

public POSContextGenerator getPOSContextGenerator(int cacheSize) {
 if (artifactProvider != null) {
  Properties manifest = (Properties) artifactProvider.getArtifact("manifest.properties");
  String version = manifest.getProperty("OpenNLP-Version");
  if (Version.parse(version).getMinor() < 8) {
   return new DefaultPOSContextGenerator(cacheSize, getDictionary());
  }
 }
 
 return new ConfigurablePOSContextGenerator(cacheSize, createFeatureGenerators());
}
origin: ai.idylnlp/idylnlp-opennlp-tools-1.8.3

public POSContextGenerator getPOSContextGenerator(int cacheSize) {
 if (artifactProvider != null) {
  Properties manifest = (Properties) artifactProvider.getArtifact("manifest.properties");
  String version = manifest.getProperty("OpenNLP-Version");
  if (Version.parse(version).getMinor() < 8) {
   return new DefaultPOSContextGenerator(cacheSize, getDictionary());
  }
 }
 return new ConfigurablePOSContextGenerator(cacheSize, createFeatureGenerators());
}
origin: org.apache.opennlp/opennlp-tools

public POSContextGenerator getPOSContextGenerator(int cacheSize) {
 if (artifactProvider != null) {
  Properties manifest = (Properties) artifactProvider.getArtifact("manifest.properties");
  String version = manifest.getProperty("OpenNLP-Version");
  if (Version.parse(version).getMinor() < 8) {
   return new DefaultPOSContextGenerator(cacheSize, getDictionary());
  }
 }
 
 return new ConfigurablePOSContextGenerator(cacheSize, createFeatureGenerators());
}
opennlp.tools.postagConfigurablePOSContextGenerator

Javadoc

A context generator for the POS Tagger.

Most used methods

  • <init>
    Initializes the current instance.
  • getContext
    Returns the context for making a pos tag decision at the specified token index given the specified t

Popular in Java

  • Running tasks concurrently on multiple threads
  • onCreateOptionsMenu (Activity)
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • notifyDataSetChanged (ArrayAdapter)
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • JOptionPane (javax.swing)
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now