Klasse ConfigurablePOSContextGenerator

java.lang.Object
opennlp.tools.postag.ConfigurablePOSContextGenerator
Alle implementierten Schnittstellen:
POSContextGenerator, BeamSearchContextGenerator<String>

public class ConfigurablePOSContextGenerator extends Object implements POSContextGenerator
A configurable context generator for a POSTagger. This implementation makes use of AdaptiveFeatureGenerator.
Siehe auch:
  • Konstruktordetails

  • Methodendetails

    • getContext

      public String[] getContext(int index, String[] tokens, String[] tags, Object[] additionalContext)
      Returns the context for making a postag decision at the specified token index given the specified tokens and previous tags.
      Angegeben von:
      getContext in Schnittstelle BeamSearchContextGenerator<String>
      Angegeben von:
      getContext in Schnittstelle POSContextGenerator
      Parameter:
      index - The index of the token for which the context is provided.
      tokens - The tokens representing a sentence.
      tags - The tags assigned to the previous words in the sentence.
      additionalContext - The context for additional information.
      Gibt zurück:
      The context for making a postag decision at the specified token index given the specified tokens and previous tags.