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

How to use
ISenseEntry
in
edu.mit.jwi.item

Best Java code snippets using edu.mit.jwi.item.ISenseEntry (Showing top 7 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Dictionary d =
  • Codota Iconnew Hashtable()
  • Codota IconBundle bundle;bundle.getHeaders()
  • Codota Iconnew Properties()
  • Smart code suggestions by Codota
}
origin: edu.mit/jwi

@Override
public boolean equals(Object obj) {
  if (this == obj)
    return true;
  if (obj == null)
    return false;
  if (!(obj instanceof ISenseEntry))
    return false;
  final ISenseEntry other = (ISenseEntry) obj;
  if (count != other.getTagCount())
    return false;
  if (num != other.getSenseNumber())
    return false;
  if (offset != other.getOffset())
    return false;
  if(!key.equals(other.getSenseKey()))
    return false;
  return true;
}
origin: edu.mit/jwi

  /**
   * Creates a new sense entry that replicates the specified sense entry.
   * The new sense entry replaces it's internal sense key with the
   * specified sense key thus removing a redundant object.
   * 
   * @param key
   *            the sense key to be used
   * @param old
   *            the sense entry to be replicated
   * @return the new sense entry object
   * @throws NullPointerException
   *             if either argument is <code>null</code>
   * @since JWI 2.2.0
   */
  protected ISenseEntry makeSenseEntry(ISenseKey key, ISenseEntry old){
    return new SenseEntry(key, old.getOffset(), old.getSenseNumber(), old.getTagCount());
  }
}
origin: edu.illinois.cs.cogcomp/illinois-wnsim

private HashMap<IWordID, Double> getProbs(List<IWordID> senses) {
  HashMap<IWordID,Double> probs = new HashMap<IWordID,Double>();
  double total = 0;
  for(IWordID iw: senses) {
    total += dict.getSenseEntry(dict.getWord(iw).getSenseKey()).getTagCount();
  }
  for(IWordID iw: senses) {
    double val = dict.getSenseEntry(dict.getWord(iw).getSenseKey()).getTagCount() / total;
    if(Double.isNaN(val)) {
      val = 0.;
    }
    probs.put(iw, val);
  }
  return probs;
}
origin: edu.mit/jwi

ISynset synset = getSynset(new SynsetID(entry.getOffset(), entry.getPOS()));
if(synset != null)
  for(IWord synonym : synset.getWords())
origin: edu.mit/jwi

public void cacheSenseEntry(ISenseEntry entry){
  checkOpen();
  if(!isEnabled())
    return;
  senseCache.put(entry.getSenseKey(), entry);
  reduceCacheSize(senseCache);
}
origin: CogComp/cogcomp-nlp

private HashMap<IWordID, Double> getProbs(List<IWordID> senses) {
  HashMap<IWordID, Double> probs = new HashMap<IWordID, Double>();
  double total = 0;
  for (IWordID iw : senses) {
    total += dict.getSenseEntry(dict.getWord(iw).getSenseKey()).getTagCount();
  }
  for (IWordID iw : senses) {
    double val = dict.getSenseEntry(dict.getWord(iw).getSenseKey()).getTagCount() / total;
    if (Double.isNaN(val)) {
      val = 0.;
    }
    probs.put(iw, val);
  }
  return probs;
}
origin: edu.mit/jwi

for(Iterator<ISenseEntry> i = source.getSenseEntryIterator(); i.hasNext(); ){
  entry = i.next();
  word = result.words.get(entry.getSenseKey());
  result.senses.put(word.getSenseKey(), makeSenseEntry(word.getSenseKey(), entry));
edu.mit.jwi.itemISenseEntry

Javadoc

A Wordnet sense entry object, represented in the Wordnet files as a line in the sense entry.

Most used methods

  • getTagCount
    Returns the tag count for the sense entry. A tag count is a non-negative integer that represents the
  • getOffset
    Returns the synset offset for this sense entry, a non-negative integer.
  • getPOS
  • getSenseKey
    Returns the sense key for this sense entry. Will not return null.
  • getSenseNumber
    Returns the sense number for the word indicated by this entry. A sense number is a positive integer.

Popular in Java

  • Making http post requests using okhttp
  • getSystemService (Context)
  • setRequestProperty (URLConnection)
    Sets the general request property. If a property with the key already exists, overwrite its value wi
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • JComboBox (javax.swing)
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