Codota Logo
CanonicalPosTag.name
Code IndexAdd Codota to your IDE (free)

How to use
name
method
in
eu.excitementproject.eop.common.representation.partofspeech.CanonicalPosTag

Best Java code snippets using eu.excitementproject.eop.common.representation.partofspeech.CanonicalPosTag.name (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Gson g =
  • Codota Iconnew Gson()
  • Codota IconGsonBuilder gsonBuilder;gsonBuilder.create()
  • Codota Iconnew GsonBuilder().create()
  • Smart code suggestions by Codota
}
origin: hltfbk/Excitement-Open-Platform

@Override
public String toString() {
  StringBuilder sb = new StringBuilder();
  sb.append(lemma);
  sb.append(":");
  sb.append(pos.name());
  return sb.toString();
}

origin: hltfbk/Excitement-Open-Platform

@Override
public String toKey() throws UndefinedKeyException  {
  if (lemma.contains(DELIMITER))
    throw new UndefinedKeyException("Cannot encode lemma " + lemma + ", since it contains  one or more serialization delimiters");
  StringBuilder sb = new StringBuilder();
  sb.append(lemma);
  sb.append(DELIMITER);
  sb.append(pos == null ? "*" : pos.name());
  return sb.toString();
}
origin: hltfbk/Excitement-Open-Platform

@Override
public Set<String> toKeys() throws UndefinedKeyException  {
  if (lemma.equals(DELIMITER))
    throw new UndefinedKeyException("Cannot encode lemme " + lemma + ", since it contains  one or more serialization delimiters");
  Set<String> ret = new HashSet<String>();
  if (pos == null) {
    for (CanonicalPosTag relpos : relevantPos)
      ret.add(lemma + DELIMITER + relpos);
  } else
    ret.add(lemma + DELIMITER + pos.name());
  
  return ret;
}
origin: hltfbk/Excitement-Open-Platform

public LexicalIDM(LexicalSentenceProcessor sentPoc) throws UnsupportedPosTagStringException {
  m_nounPOS = new ByCanonicalPartOfSpeech(CanonicalPosTag.N.name());
  m_lexicalSentenceProcessor = sentPoc;
}
origin: hltfbk/Excitement-Open-Platform

public ParenthesesExtractor(Lemmatizer lemmatizer)
{
  m_lemmatizer=lemmatizer;
  m_logger = org.apache.log4j.Logger.getLogger(ParenthesesExtractor.class.getName());
  try {
    m_lemmatizer.init();
    m_nounPOS = new eu.excitementproject.eop.common.representation.partofspeech.ByCanonicalPartOfSpeech(eu.excitementproject.eop.common.representation.partofspeech.CanonicalPosTag.N.name());
  } catch (UnsupportedPosTagStringException e) {
    m_logger.warn("should never happend because we only create CanonicalPosTag.NOUN   . Exception:",e);		
  } catch (LemmatizerException e) {
    m_logger.fatal("failed to initialize lemmatizer in ParenthesesExtractor",e);
  }
  
  
}

origin: hltfbk/Excitement-Open-Platform

public SyntacticIDM(SyntacticUtils utils) throws UnsupportedPosTagStringException, ParserRunException{
  super();
  m_logger = org.apache.log4j.Logger.getLogger(SyntacticIDM.class.getName());
  m_treeParser = utils.getParserInstance();
  m_utils = utils;
  m_nounPOS = new ByCanonicalPartOfSpeech(CanonicalPosTag.N.name());
}
  
origin: hltfbk/Excitement-Open-Platform

public RedirectExtractor(Lemmatizer lemmatizer)
{
  m_lemmatizer=lemmatizer;
  m_logger = org.apache.log4j.Logger.getLogger(RedirectExtractor.class.getName());
  
  try {
    m_lemmatizer.init();
    m_nounPOS = new eu.excitementproject.eop.common.representation.partofspeech.ByCanonicalPartOfSpeech(eu.excitementproject.eop.common.representation.partofspeech.CanonicalPosTag.N.name());
  } catch (UnsupportedPosTagStringException e) {
    m_logger.warn("should never happend because we only create CanonicalPosTag.NOUN   . Exception:",e);
    
  } catch (LemmatizerException e) {
    m_logger.fatal("failed to initialize lemmatizer in RedirectExtractor",e);
  }
  
}
@Override
origin: hltfbk/Excitement-Open-Platform

public CategoryExtractor(Lemmatizer lemmatizer)
{
  m_lemmatizer=lemmatizer;
  m_logger = org.apache.log4j.Logger.getLogger(CategoryExtractor.class.getName());
  try {
    m_lemmatizer.init();
    m_nounPOS = new eu.excitementproject.eop.common.representation.partofspeech.ByCanonicalPartOfSpeech(eu.excitementproject.eop.common.representation.partofspeech.CanonicalPosTag.N.name());
  } catch (UnsupportedPosTagStringException e) {
    e.printStackTrace();
  } catch (LemmatizerException e) {
    m_logger.fatal("failed to initialize lemmatizer in CategoryExtractor",e);
  }
  
}

origin: hltfbk/Excitement-Open-Platform

public WikipediaLexicalResource(Classifier classifier, int limitOnRetrievedRules, String  driver, String  url, String  username,
            String  password  ) throws UnsupportedPosTagStringException {
  this.m_nounPOS = new eu.excitementproject.eop.common.representation.partofspeech.ByCanonicalPartOfSpeech(CanonicalPosTag.N.name());
  this.m_classifier = classifier;
  this.m_limitOnRetrievedRules = limitOnRetrievedRules;
  this.m_retrivalTool = new RetrievalTool(driver, url, username, password);
}
origin: hltfbk/Excitement-Open-Platform

public void set(String word) throws LemmatizerException {
  this.word = word;
  try {
    this.partOfSpeech = new ByCanonicalPartOfSpeech(CanonicalPosTag.N.name());
  }
  catch(Exception e) {
    throw new LemmatizerException("POS exception", e);
  }
}
origin: hltfbk/Excitement-Open-Platform

public LinksExtractor(Lemmatizer lemmatizer)
{
  m_lemmatizer=lemmatizer;
  m_logger = org.apache.log4j.Logger.getLogger(LinksExtractor.class.getName());

  
  try {
    m_lemmatizer.init();
    m_nounPOS = new eu.excitementproject.eop.common.representation.partofspeech.ByCanonicalPartOfSpeech(eu.excitementproject.eop.common.representation.partofspeech.CanonicalPosTag.N.name());
  } catch (UnsupportedPosTagStringException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
  } catch (LemmatizerException e) {
    m_logger.fatal("failed to initialize lemmatizer in LinksExtractor",e);
  }
}
@Override
origin: hltfbk/Excitement-Open-Platform

public RedisBasedWikipediaLexicalResource(Classifier classifier, int limitOnRetrievedRules, String leftRedisDBFile, String rightRedisDBFile, boolean bVM) throws UnsupportedPosTagStringException, FileNotFoundException, RedisRunException {
  leftRules = new RedisBasedStringListBasicMap(leftRedisDBFile, bVM);
  rightRules = new RedisBasedStringListBasicMap(rightRedisDBFile, bVM);
  this.m_nounPOS = new eu.excitementproject.eop.common.representation.partofspeech.ByCanonicalPartOfSpeech(CanonicalPosTag.N.name());
  this.m_classifier = classifier;
  this.m_limitOnRetrievedRules = limitOnRetrievedRules;
  
}

origin: hltfbk/Excitement-Open-Platform

public RedisBasedWikipediaLexicalResource(Classifier classifier, int limitOnRetrievedRules, String leftRedisHost, int leftRedisPort, String rightRedisHost, int rightRedisPort) throws UnsupportedPosTagStringException {
  leftRules = new RedisBasedStringListBasicMap(leftRedisHost,leftRedisPort);
  rightRules = new RedisBasedStringListBasicMap(rightRedisHost,rightRedisPort);
  this.m_nounPOS = new eu.excitementproject.eop.common.representation.partofspeech.ByCanonicalPartOfSpeech(CanonicalPosTag.N.name());
  this.m_classifier = classifier;
  this.m_limitOnRetrievedRules = limitOnRetrievedRules;
}
origin: hltfbk/Excitement-Open-Platform

public LexicalIDM(Tokenizer tokenizer, PosTagger postagger,	
    Lemmatizer lemmatizer) throws InstrumentCombinationException, TokenizerException, PosTaggerException, LemmatizerException, UnsupportedPosTagStringException {
  
  
  m_tokenizer = tokenizer;
  m_tokenizer.init(); // we must call init before using the tokenizer
  m_postagger = postagger;
  m_postagger.init();// we must call init before using the tagger (process function)
  m_lemmatizer = lemmatizer;
  m_lemmatizer.init();//we must call it?
  
  m_nounPOS = new ByCanonicalPartOfSpeech(CanonicalPosTag.N.name());
  
  m_lexicalSentenceProcessor=new LexicalSentenceProcessor(tokenizer, postagger, lemmatizer, null);
  
}
origin: hltfbk/Excitement-Open-Platform

public WikipediaLexicalResource(ConfigurationParams params) throws ConfigurationException, LexicalResourceException {
    this.m_nounPOS = new eu.excitementproject.eop.common.representation.partofspeech.ByCanonicalPartOfSpeech(CanonicalPosTag.N.name());
  } catch (UnsupportedPosTagStringException e) {
    throw new LexicalResourceException(e.toString());
origin: hltfbk/Excitement-Open-Platform

PartOfSpeech testPOS = new ByCanonicalPartOfSpeech(CanonicalPosTag.NN.name());
origin: hltfbk/Excitement-Open-Platform

  public static void main(String args[]) throws LexicalResourceException, UnsupportedPosTagStringException {
    Direct1000LexicalResource resource = new Direct1000LexicalResource("jdbc:mysql://localhost:3306/bap","root","root",10);
    List<? extends LexicalRule<? extends RuleInfo>> similarities = resource.getRulesForLeft("find",new ByCanonicalPartOfSpeech(CanonicalPosTag.V.name()));
    for (LexicalRule<? extends RuleInfo> similarity : similarities)
      System.out.println("<" + similarity.getLLemma() + "," + similarity.getLPos() + ">" + " --> " + "<" + similarity.getRLemma() + "," + similarity.getRPos() + ">" + ": " + similarity.getConfidence());

  }
}
origin: hltfbk/Excitement-Open-Platform

WiktionaryPartOfSpeech wktPos = WiktionaryPartOfSpeech.toWiktionaryPartOfspeech(new ByCanonicalPartOfSpeech( CanonicalPosTag.N.name()));
List<WiktionarySense> senses = wiktionary.getSortedSensesOf(lemma, wktPos);
origin: hltfbk/Excitement-Open-Platform

LexicalRule<RuleInfo> rule = 
  new LexicalRule<RuleInfo>(
      left.getData().getLemma(), new ByCanonicalPartOfSpeech(left.getData().getPOS().name()),
      right.getData().getLemma(), new ByCanonicalPartOfSpeech(right.getData().getPOS().name()),
      elemenstSimilarityMeasure.getSimilarityMeasure(), 
      null, similarityStorage.getComponentName(), DistSimRuleInfo.getInstance());
origin: hltfbk/Excitement-Open-Platform

@Override
public List<LexicalRule<? extends RuleInfo>> getRules(String leftLemma, PartOfSpeech leftPos, String rightLemma, PartOfSpeech rightPos) throws LexicalResourceException {
  try {
    List<LexicalRule<? extends RuleInfo>> ret = new LinkedList<LexicalRule<? extends RuleInfo>>();
    LemmaPosBasedElement leftElement = new LemmaPosBasedElement(new LemmaPos(leftLemma, (leftPos == null ? null : leftPos.getCanonicalPosTag())));
    LemmaPosBasedElement rightElement = new LemmaPosBasedElement(new LemmaPos(rightLemma, (rightPos == null ? null : rightPos.getCanonicalPosTag())));
    for (ElementsSimilarityMeasure similarityRule : similarityStorage.getSimilarityMeasure(leftElement, rightElement)) {
      LemmaPosBasedElement left = (LemmaPosBasedElement)similarityRule.getLeftElement();
      LemmaPosBasedElement right = (LemmaPosBasedElement)similarityRule.getRightElement();
      ret.add(new LexicalRule<RuleInfo>(left.getData().getLemma(), new ByCanonicalPartOfSpeech(left.getData().getPOS().name()), right.getData().getLemma(), new ByCanonicalPartOfSpeech(right.getData().getPOS().name()), similarityRule.getSimilarityMeasure(), null, similarityStorage.getComponentName(), 
          DistSimRuleInfo.getInstance()));
    }
    return ret;
  } catch (Exception e) {
    throw new LexicalResourceException(ExceptionUtil.getStackTrace(e));
  }
}
eu.excitementproject.eop.common.representation.partofspeechCanonicalPosTagname

Popular methods of CanonicalPosTag

  • equals
  • hashCode
  • toString
  • valueOf

Popular in Java

  • Reading from database using SQL prepared statement
  • getSystemService (Context)
  • onCreateOptionsMenu (Activity)
  • startActivity (Activity)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • Menu (java.awt)
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • JButton (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