Package edu.stanford.nlp.trees.tregex.tsurgeon

Examples of edu.stanford.nlp.trees.tregex.tsurgeon.TsurgeonPattern.matcher()


          newTreeStr = "(sn (grup.nom (pp000000 %s)))";
        }

        String patternString = "[insert " + String.format(newTreeStr, pronoun) + " $- target]";
        TsurgeonPattern insertPattern = Tsurgeon.parseOperation(patternString);
        t = insertPattern.matcher().evaluate(t, matcher);
      }

      TsurgeonPattern relabelOperation =
        Tsurgeon.parseOperation(String.format("[relabel vb /%s/]", split.first()));
      t = relabelOperation.matcher().evaluate(t, matcher);
View Full Code Here


        t = insertPattern.matcher().evaluate(t, matcher);
      }

      TsurgeonPattern relabelOperation =
        Tsurgeon.parseOperation(String.format("[relabel vb /%s/]", split.first()));
      t = relabelOperation.matcher().evaluate(t, matcher);
    }

    return t;
  }
View Full Code Here

      String tsurgeon = String.format(
        "[relabel conmigo /%s/]" +
          "[adjoinF (sp (prep (sp000 con)) foot@) sn]",
        newPronoun);
      TsurgeonPattern pattern = Tsurgeon.parseOperation(tsurgeon);
      t = pattern.matcher().evaluate(t, matcher);
    }

    return t;
  }
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.