Codota Logo
NamedEntityWord.getNamedEntity
Code IndexAdd Codota to your IDE (free)

How to use
getNamedEntity
method
in
eu.excitementproject.eop.lap.biu.ner.NamedEntityWord

Best Java code snippets using eu.excitementproject.eop.lap.biu.ner.NamedEntityWord.getNamedEntity (Showing top 6 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ScheduledThreadPoolExecutor s =
  • Codota Iconnew ScheduledThreadPoolExecutor(corePoolSize)
  • Codota IconThreadFactory threadFactory;new ScheduledThreadPoolExecutor(corePoolSize, threadFactory)
  • Codota IconString str;new ScheduledThreadPoolExecutor(1, new ThreadFactoryBuilder().setNameFormat(str).build())
  • Smart code suggestions by Codota
}
origin: hltfbk/Excitement-Open-Platform

if (neWord.getNamedEntity()!=null)
  System.out.print(neWord.getNamedEntity().name());
origin: hltfbk/Excitement-Open-Platform

System.out.println(neWord.getWord()+" ["+neWord.getNamedEntity()+"]");
origin: hltfbk/Excitement-Open-Platform

/**
 * A demo program for Stanford NER.
 * @param args a single argument which is the path of a classifier from the Stanford NER package, e.g.
 *      ${env_var:JARS}/stanford-ner-2009-01-16/classifiers/ner-eng-ie.crf-3-all2008-distsim.ser.gz
 * @throws Exception 
 */
public static void main(String[] args) throws Exception {
  if (args.length==0) 
    throw new IllegalArgumentException("First argument must be the path to a Stanford NER classifier (with .ser.gz extension)");
  String pathToNER = args[0];
  StanfordNamedEntityRecognizer ner = new StanfordNamedEntityRecognizer( new File(pathToNER));
  ner.init();
  String testString = "The Israeli PM Binyamin Netanyahu said that Israel will accept the Eitan W. Shishinsky recommendations";
  //String testString = "In December 2004 the state sold 18.4% of its equity in Air France-KLM. The state's shareholding in Air France-KLM subsequently fell to just under 20%.";
  LinkedList<String> testStringList = new LinkedList<String>();
  for (String word : testString.split(" "))
    testStringList.add(word);
  ner.setSentence(testStringList);
  ner.recognize();
  System.out.println("\nNEs detected:");
  System.out.println(ner.getAnnotatedEntities());
  System.out.println("\nNE tag for each word: ");
  List<NamedEntityWord> list = ner.getAnnotatedSentence();
  for (NamedEntityWord neWord: list)
    System.out.println(neWord.getWord()+" ["+neWord.getNamedEntity()+"]");
  ner.cleanUp();
}
origin: hltfbk/Excitement-Open-Platform

private void addNerInfo(List<String> tokenizedSent,	List<TokenInfo> processedSent) throws InstrumentCombinationException {
  List<NamedEntityWord> nerSent = null;
  try {
    m_ner.setSentence(tokenizedSent);
    m_ner.recognize();
    nerSent = m_ner.getAnnotatedSentence();
  } catch (NamedEntityRecognizerException e) {
    throw new InstrumentCombinationException("see nested exception from NamedEntityRecognizer:", e);
  }
  if(nerSent.size() != processedSent.size()){
    throw new InstrumentCombinationException("the number of ner-tagged tokens is not equal" +
        " to the number of sentence-tokens in input sentence " + tokenizedSent);
  }
  Iterator<TokenInfo> procSentIter = processedSent.iterator();
  Iterator<NamedEntityWord> nerSentIter = nerSent.iterator();
  while(procSentIter.hasNext()){
    TokenInfo tInfo = procSentIter.next();
    NamedEntityWord nerTerm = nerSentIter.next();
    if(tInfo.getOrigStr().equals(nerTerm.getWord())){
      tInfo.setNamedEntity(nerTerm.getNamedEntity());
    }else{
      throw new InstrumentCombinationException("a mismatch was found between a ner-tagged word" +
          " and the sentence word " + tInfo.getOrigStr() + " of input sentence " + tokenizedSent);
    }
  }
}
origin: hltfbk/Excitement-Open-Platform

Token tokenAnno = tokenIter.next();
if (taggedToken.getNamedEntity() != null) {
  String tagString = taggedToken.getNamedEntity().toString();
origin: hltfbk/Excitement-Open-Platform

public void makeOperation()
{
  NodeInfo nodeInfo = null;
  try{nodeInfo = node.getInfo().getNodeInfo();}catch(Exception e){}
  String word = null;
  String lemma = null;
  int serial = 0;
  NamedEntity namedEntity = null;
  SyntacticInfo syntacticInfo = null;
  if (nodeInfo != null)
  {
    word = nodeInfo.getWord();
    lemma = nodeInfo.getWordLemma();
    serial = nodeInfo.getSerial();
    syntacticInfo = nodeInfo.getSyntacticInfo();
  }
  namedEntity = neWord.getNamedEntity();
  
  Info oldInfo = node.getInfo();
  
  node.setInfo(new DefaultInfo(oldInfo.getId(),new DefaultNodeInfo(word,lemma,serial,namedEntity,syntacticInfo),oldInfo.getEdgeInfo()));
}

eu.excitementproject.eop.lap.biu.nerNamedEntityWordgetNamedEntity

Javadoc

Returns the NamedEntity assigned to that word

Popular methods of NamedEntityWord

  • <init>
    Straightforward constructor
  • getWord
    Returns the word

Popular in Java

  • Updating database using SQL prepared statement
  • requestLocationUpdates (LocationManager)
  • notifyDataSetChanged (ArrayAdapter)
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • FileOutputStream (java.io)
    A file output stream is an output stream for writing data to aFile or to a FileDescriptor. Whether
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • Socket (java.net)
    Provides a client-side TCP socket.
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • JLabel (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