Package edu.stanford.nlp.sempre.fbalignment.lexicons

Examples of edu.stanford.nlp.sempre.fbalignment.lexicons.UnaryLexicon.lookupEntries()


    UnaryLexicon unary = new UnaryLexicon();
    boolean existsAlignment = false, existsStringMatch=false;
    double popularity=0.0;
    double intersection=0.0;
   
    List<UnaryLexicalEntry> entries = unary.lookupEntries("continent");
    LogInfo.logs("Num of entries: %s",entries.size());
    for(UnaryLexicalEntry entry: entries) {
      if(entry.formula.toString().equals("(fb:type.object.type fb:location.continent)")) {
        if(entry.source==EntrySource.ALIGNMENT) {
          existsAlignment=true;
View Full Code Here


   
    existsAlignment = false;
    existsStringMatch=false;
    popularity=0.0;
    intersection=0.0;
    entries = unary.lookupEntries("lawyer");
    for(UnaryLexicalEntry entry: entries) {
      if(entry.formula.toString().equals("(fb:people.person.profession fb:en.attorney)")) {
        if(entry.source==EntrySource.ALIGNMENT) {
          existsAlignment=true;
          intersection = entry.alignmentScores.get(UnaryLexicon.INTERSECTION);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.