Tabnine Logo
ISenseEntry.getTagCount
Code IndexAdd Tabnine to your IDE (free)

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

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

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.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

@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());
  }
}
edu.mit.jwi.itemISenseEntrygetTagCount

Javadoc

Returns the tag count for the sense entry. A tag count is a non-negative integer that represents the number of times the sense is tagged in various semantic concordance texts. A count of 0 indicates that the sense has not been semantically tagged.

Popular methods of ISenseEntry

  • 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

  • Finding current android device location
  • setRequestProperty (URLConnection)
  • onRequestPermissionsResult (Fragment)
  • putExtra (Intent)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • Top PhpStorm 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