Tabnine Logo
IndexWord.getLemma
Code IndexAdd Tabnine to your IDE (free)

How to use
getLemma
method
in
net.sf.extjwnl.data.IndexWord

Best Java code snippets using net.sf.extjwnl.data.IndexWord.getLemma (Showing top 20 results out of 315)

origin: extjwnl/extjwnl

/**
 * Returns true if the lemma and the part of speech both match.
 */
public boolean equals(Object object) {
  return (object instanceof IndexWord)
      && ((IndexWord) object).getLemma().equals(getLemma()) && ((IndexWord) object).getPOS().equals(getPOS());
}
origin: net.sf.extjwnl/extjwnl

/**
 * Returns true if the lemma and the part of speech both match.
 */
public boolean equals(Object object) {
  return (object instanceof IndexWord)
      && ((IndexWord) object).getLemma().equals(getLemma()) && ((IndexWord) object).getPOS().equals(getPOS());
}
origin: net.sf.extjwnl/extjwnl

public Iterator<IndexWord> getIndexWordIterator(POS pos, String substring) {
  substring = prepareQueryString(substring);
  final Iterator<IndexWord> itr = getIndexWordIterator(pos);
  IndexWord start = null;
  while (itr.hasNext()) {
    IndexWord word = itr.next();
    if (word.getLemma().contains(substring)) {
      start = word;
      break;
    }
  }
  return new AbstractCachingDictionary.IndexWordIterator(itr, substring, start);
}
origin: net.sf.extjwnl/extjwnl

public int hashCode() {
  return getLemma().hashCode() ^ getPOS().hashCode();
}
origin: extjwnl/extjwnl

public Iterator<IndexWord> getIndexWordIterator(POS pos, String substring) {
  substring = prepareQueryString(substring);
  final Iterator<IndexWord> itr = getIndexWordIterator(pos);
  IndexWord start = null;
  while (itr.hasNext()) {
    IndexWord word = itr.next();
    if (word.getLemma().contains(substring)) {
      start = word;
      break;
    }
  }
  return new AbstractCachingDictionary.IndexWordIterator(itr, substring, start);
}
origin: extjwnl/extjwnl

public int hashCode() {
  return getLemma().hashCode() ^ getPOS().hashCode();
}
origin: extjwnl/extjwnl

@Override
public Iterator<IndexWord> getIndexWordIterator(POS pos, String substring) throws JWNLException {
  substring = prepareQueryString(substring);
  final Iterator<IndexWord> itr = getIndexWordIterator(pos);
  IndexWord start = null;
  while (itr.hasNext()) {
    IndexWord word = itr.next();
    if (word.getLemma().contains(substring)) {
      start = word;
      break;
    }
  }
  return new IndexWordIterator(itr, substring, start);
}
origin: net.sf.extjwnl/extjwnl-utilities

private void demonstrateListOperation(IndexWord word) throws JWNLException {
  // Get all of the hypernyms (parents) of the first sense of <var>word</var>
  PointerTargetNodeList hypernyms = PointerUtils.getDirectHypernyms(word.getSenses().get(0));
  System.out.println("Direct hypernyms of \"" + word.getLemma() + "\":");
  hypernyms.print();
}
origin: net.sf.extjwnl/extjwnl-utilities

private void demonstrateTreeOperation(IndexWord word) throws JWNLException {
  // Get all the hyponyms (children) of the first sense of <var>word</var>
  PointerTargetTree hyponyms = PointerUtils.getHyponymTree(word.getSenses().get(0));
  System.out.println("Hyponyms of \"" + word.getLemma() + "\":");
  hyponyms.print();
}
origin: extjwnl/extjwnl

private void demonstrateTreeOperation(IndexWord word) throws JWNLException {
  // Get all the hyponyms (children) of the first sense of <var>word</var>
  PointerTargetTree hyponyms = PointerUtils.getHyponymTree(word.getSenses().get(0));
  System.out.println("Hyponyms of \"" + word.getLemma() + "\":");
  hyponyms.print();
}
origin: net.sf.extjwnl/extjwnl

@Override
public Iterator<IndexWord> getIndexWordIterator(POS pos, String substring) throws JWNLException {
  substring = prepareQueryString(substring);
  final Iterator<IndexWord> itr = getIndexWordIterator(pos);
  IndexWord start = null;
  while (itr.hasNext()) {
    IndexWord word = itr.next();
    if (word.getLemma().contains(substring)) {
      start = word;
      break;
    }
  }
  return new IndexWordIterator(itr, substring, start);
}
origin: extjwnl/extjwnl

private void demonstrateListOperation(IndexWord word) throws JWNLException {
  // Get all of the hypernyms (parents) of the first sense of <var>word</var>
  PointerTargetNodeList hypernyms = PointerUtils.getDirectHypernyms(word.getSenses().get(0));
  System.out.println("Direct hypernyms of \"" + word.getLemma() + "\":");
  hypernyms.print();
}
origin: extjwnl/extjwnl

  private void demonstrateSymmetricRelationshipOperation(IndexWord start, IndexWord end) throws JWNLException, CloneNotSupportedException {
    // find all synonyms that <var>start</var> and <var>end</var> have in common
    RelationshipList list = RelationshipFinder.findRelationships(start.getSenses().get(0), end.getSenses().get(0), PointerType.SIMILAR_TO);
    System.out.println("Synonym relationship between \"" + start.getLemma() + "\" and \"" + end.getLemma() + "\":");
    for (Object aList : list) {
      ((Relationship) aList).getNodeList().print();
    }
    System.out.println("Depth: " + list.get(0).getDepth());
  }
}
origin: net.sf.extjwnl/extjwnl

public String toString() {
  return ResourceBundleSet.insertParams("[IndexWord: [Lemma: {0}] {1}]", new Object[]{getLemma(), getPOS()});
}
origin: net.sf.extjwnl/extjwnl-utilities

  private void demonstrateSymmetricRelationshipOperation(IndexWord start, IndexWord end) throws JWNLException, CloneNotSupportedException {
    // find all synonyms that <var>start</var> and <var>end</var> have in common
    RelationshipList list = RelationshipFinder.findRelationships(start.getSenses().get(0), end.getSenses().get(0), PointerType.SIMILAR_TO);
    System.out.println("Synonym relationship between \"" + start.getLemma() + "\" and \"" + end.getLemma() + "\":");
    for (Object aList : list) {
      ((Relationship) aList).getNodeList().print();
    }
    System.out.println("Depth: " + list.get(0).getDepth());
  }
}
origin: extjwnl/extjwnl

public String toString() {
  return ResourceBundleSet.insertParams("[IndexWord: [Lemma: {0}] {1}]", new Object[]{getLemma(), getPOS()});
}
origin: extjwnl/extjwnl

private void demonstrateAsymmetricRelationshipOperation(IndexWord start, IndexWord end) throws JWNLException, CloneNotSupportedException {
  // Try to find a relationship between the first sense of <var>start</var> and the first sense of <var>end</var>
  RelationshipList list = RelationshipFinder.findRelationships(start.getSenses().get(0), end.getSenses().get(0), PointerType.HYPERNYM);
  System.out.println("Hypernym relationship between \"" + start.getLemma() + "\" and \"" + end.getLemma() + "\":");
  for (Object aList : list) {
    ((Relationship) aList).getNodeList().print();
  }
  System.out.println("Common Parent Index: " + ((AsymmetricRelationship) list.get(0)).getCommonParentIndex());
  System.out.println("Depth: " + list.get(0).getDepth());
}
origin: net.sf.extjwnl/extjwnl-utilities

private void demonstrateAsymmetricRelationshipOperation(IndexWord start, IndexWord end) throws JWNLException, CloneNotSupportedException {
  // Try to find a relationship between the first sense of <var>start</var> and the first sense of <var>end</var>
  RelationshipList list = RelationshipFinder.findRelationships(start.getSenses().get(0), end.getSenses().get(0), PointerType.HYPERNYM);
  System.out.println("Hypernym relationship between \"" + start.getLemma() + "\" and \"" + end.getLemma() + "\":");
  for (Object aList : list) {
    ((Relationship) aList).getNodeList().print();
  }
  System.out.println("Common Parent Index: " + ((AsymmetricRelationship) list.get(0)).getCommonParentIndex());
  System.out.println("Depth: " + list.get(0).getDepth());
}
origin: dstl/baleen

@Test
public void testLookupWord() throws JWNLException {
 final IndexWord word = wnr.lookupWord(POS.VERB, "employing").get();
 Assert.assertEquals("employ", word.getLemma());
}
origin: dstl/baleen

@Test
public void testGetWord() throws JWNLException {
 final Optional<IndexWord> missing = wnr.getWord(POS.VERB, "employs");
 Assert.assertFalse(missing.isPresent());
 final IndexWord employ = wnr.getWord(POS.VERB, "employ").get();
 Assert.assertNotNull(employ);
 Assert.assertEquals("employ", employ.getLemma());
}
net.sf.extjwnl.dataIndexWordgetLemma

Javadoc

Return the word's lemma. Its lemma is its orthographic representation, for example "dog" or "get up".

Popular methods of IndexWord

  • getSenses
    Returns the senses of this word.
  • getPOS
    Returns the word's part-of-speech.
  • getSynsetOffsets
  • <init>
  • getKey
    Returns the lemma of this word.
  • getUseCount
  • setDictionary
  • sortSenses
    Sorts senses according to their use count.
  • toString

Popular in Java

  • Making http post requests using okhttp
  • setScale (BigDecimal)
  • getExternalFilesDir (Context)
  • getApplicationContext (Context)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • Best IntelliJ plugins
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