Codota Logo
TextAnnotation.getSpansMatching
Code IndexAdd Codota to your IDE (free)

How to use
getSpansMatching
method
in
edu.illinois.cs.cogcomp.core.datastructures.textannotation.TextAnnotation

Best Java code snippets using edu.illinois.cs.cogcomp.core.datastructures.textannotation.TextAnnotation.getSpansMatching (Showing top 9 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
SimpleDateFormat s =
  • Codota IconString pattern;new SimpleDateFormat(pattern)
  • Codota IconString template;Locale locale;new SimpleDateFormat(template, locale)
  • Codota Iconnew SimpleDateFormat()
  • Smart code suggestions by Codota
}
origin: edu.illinois.cs.cogcomp/illinois-edison

  private Map<String, List<IntPair>> getMatchingSpans(TextAnnotation ta) {
    Map<String, List<IntPair>> map = new HashMap<>();

    for (Entry<String, List<String>> entry : this.clusterToStrings.entrySet()) {
      String clusterId = entry.getKey();
      List<String> patterns = entry.getValue();

      for (String pattern : patterns) {
        List<IntPair> list = ta.getSpansMatching(pattern);

        if (list.size() > 0) {
          if (!map.containsKey(clusterId))
            map.put(clusterId, new ArrayList<IntPair>());

          map.get(clusterId).addAll(list);
        }
      }

    }
    return map;
  }
}
origin: CogComp/cogcomp-nlp

  private Map<String, List<IntPair>> getMatchingSpans(TextAnnotation ta) {
    Map<String, List<IntPair>> map = new HashMap<>();

    for (Entry<String, List<String>> entry : this.clusterToStrings.entrySet()) {
      String clusterId = entry.getKey();
      List<String> patterns = entry.getValue();

      for (String pattern : patterns) {
        List<IntPair> list = ta.getSpansMatching(pattern);

        if (list.size() > 0) {
          if (!map.containsKey(clusterId))
            map.put(clusterId, new ArrayList<IntPair>());

          map.get(clusterId).addAll(list);
        }
      }

    }
    return map;
  }
}
origin: CogComp/talen

for(IntPair span : ta.getSpansMatching(context)){
  IntPair nextspan = new IntPair(span.getSecond(), span.getSecond()+1);
  if(span.getSecond() < ta.size()) {
for(IntPair span : ta.getSpansMatching(context)){
  IntPair prevspan = new IntPair(span.getFirst()-1, span.getFirst());
  if(span.getFirst() > 0) {
for(IntPair span : ta.getSpansMatching(surface)){
  Suggestion s = new Suggestion(span, label, String.format("%s for %s, weight: %f", featname, label, patterns.get(feat)));
  suggestions.add(s);
origin: CogComp/talen

List<IntPair> spans = ta.getSpansMatching(surface);
origin: CogComp/cogcomp-nlp

for (String pattern : currencies) {
  List<IntPair> list = ta.getSpansMatching(pattern);
origin: edu.illinois.cs.cogcomp/illinois-edison

for (String pattern : currencies) {
  List<IntPair> list = ta.getSpansMatching(pattern);
origin: CogComp/talen

boolean propagate = true;
if(propagate){
  spans = ta.getSpansMatching(text);
origin: CogComp/cogcomp-nlp

List<IntPair> startEndPos = ta.getSpansMatching(currStr);
  currSpan = ta.getSpansMatching("2009-2010").get(0);
  charStart = ta.getTokenCharacterOffset(currSpan.getFirst()).getFirst();
  charEnd = ta.getTokenCharacterOffset(currSpan.getFirst()).getSecond()-5;
  currSpan = ta.getSpansMatching("2009-2010").get(0);
  charStart = ta.getTokenCharacterOffset(currSpan.getFirst()).getFirst()+5;
  charEnd = ta.getTokenCharacterOffset(currSpan.getFirst()).getSecond();
origin: edu.illinois.cs.cogcomp/illinois-time

List<IntPair> startEndPos = ta.getSpansMatching(currStr);
  currSpan = ta.getSpansMatching("2009-2010").get(0);
  charStart = ta.getTokenCharacterOffset(currSpan.getFirst()).getFirst();
  charEnd = ta.getTokenCharacterOffset(currSpan.getFirst()).getSecond()-5;
  currSpan = ta.getSpansMatching("2009-2010").get(0);
  charStart = ta.getTokenCharacterOffset(currSpan.getFirst()).getFirst()+5;
  charEnd = ta.getTokenCharacterOffset(currSpan.getFirst()).getSecond();
edu.illinois.cs.cogcomp.core.datastructures.textannotationTextAnnotationgetSpansMatching

Popular methods of TextAnnotation

  • addView
  • getView
  • hasView
  • getText
  • getId
  • getSentence
  • getTokens
  • getToken
  • getNumberOfSentences
  • size
  • getTokenIdFromCharacterOffset
    Get the position of token that corresponds to the character offset that is passed as a parameter. Th
  • getAvailableViews
  • getTokenIdFromCharacterOffset,
  • getAvailableViews,
  • <init>,
  • getSentenceId,
  • getTokenizedText,
  • getCorpusId,
  • getSentenceFromToken,
  • getTokensInSpan,
  • sentences,
  • addAttribute

Popular in Java

  • Finding current android device location
  • onRequestPermissionsResult (Fragment)
  • findViewById (Activity)
  • getContentResolver (Context)
  • BufferedReader (java.io)
    Reads text from a character-input stream, buffering characters so as to provide for the efficient re
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
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