Tabnine Logo
StringList.toString
Code IndexAdd Tabnine to your IDE (free)

How to use
toString
method
in
opennlp.tools.util.StringList

Best Java code snippets using opennlp.tools.util.StringList.toString (Showing top 8 results out of 315)

origin: apache/opennlp

 @Override
 public String toString() {
  return this.stringList.toString();
 }
}
origin: apache/opennlp

@Override
public int hashCode() {
 // if lookup is too slow optimize this
 return StringUtil.toLowerCase(this.stringList.toString()).hashCode();
}
origin: apache/opennlp

 /**
  * Tests {@link StringList#toString()}.
  */
 @Test
 public void testToString() {
  Assert.assertEquals("[a]", new StringList("a").toString());
  Assert.assertEquals("[a,b]", new StringList("a", "b").toString());
 }
}
origin: apache/opennlp

 @Override
 public String[] getContext(CharSequence document) {
  String[] superContext = super.getContext(document);
  List<String> context = new ArrayList(Arrays.asList(superContext));
  document = this.normalizer.normalize(document);
  SimpleTokenizer tokenizer = SimpleTokenizer.INSTANCE;
  String[] words = tokenizer.tokenize(document.toString());
  NGramModel tokenNgramModel = new NGramModel();
  if (words.length > 0) {
   tokenNgramModel.add(new StringList(words), 1, 3);
   Iterator tokenNgramIterator = tokenNgramModel.iterator();
   while (tokenNgramIterator.hasNext()) {
    StringList tokenList = (StringList) tokenNgramIterator.next();
    if (tokenList.size() > 0) {
     context.add("tg=" + tokenList.toString());
    }
   }
  }
  return context.toArray(new String[context.size()]);
 }
}
origin: ai.idylnlp/idylnlp-opennlp-tools-1.8.3

 @Override
 public String toString() {
  return this.stringList.toString();
 }
}
origin: org.apache.opennlp/opennlp-tools

 @Override
 public String toString() {
  return this.stringList.toString();
 }
}
origin: ai.idylnlp/idylnlp-opennlp-tools-1.8.3

@Override
public int hashCode() {
 // if lookup is too slow optimize this
 return StringUtil.toLowerCase(this.stringList.toString()).hashCode();
}
origin: org.apache.opennlp/opennlp-tools

@Override
public int hashCode() {
 // if lookup is too slow optimize this
 return StringUtil.toLowerCase(this.stringList.toString()).hashCode();
}
opennlp.tools.utilStringListtoString

Popular methods of StringList

  • <init>
    Initializes the current instance. Note: Token Strings will be replaced by identical internal String
  • getToken
    Retrieves a token from the given index.
  • size
    Retrieves the number of tokens inside this list.
  • compareToIgnoreCase
    Compares to tokens list and ignores the case of the tokens. Note: This can cause problems with some
  • equals
  • iterator
    Retrieves an Iterator over all tokens.
  • hashCode

Popular in Java

  • Running tasks concurrently on multiple threads
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getApplicationContext (Context)
  • setContentView (Activity)
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • JOptionPane (javax.swing)
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now