コード例 #1
0
  /**
   * compare two lexical chains
   *
   * @param otherLexicalChain
   * @param similarityMeasure
   * @return
   */
  public Double compare(
      LexicalChain otherLexicalChain, SimilarityMeasures<String> similarityMeasure) {

    return similarityMeasure.measureSetSetSimilarity(
        getLexicalChain(), otherLexicalChain.getLexicalChain());
    // return (setSimilarityMeasures.containmentSimilarity(getLexicalChain(),
    // otherLexicalChain.getLexicalChain()) +
    // setSimilarityMeasures.containmentSimilarity(otherLexicalChain.getLexicalChain(),getLexicalChain()))/2 ;
  }
コード例 #2
0
 public void addLexicalChain(LexicalChain lexicalChain) {
   getLexicalChain().addAll(lexicalChain.getLexicalChain());
 }
コード例 #3
0
 public LexicalChain(LexicalChain lexicalChain) {
   super();
   this.lexicalChains = new HashSet<String>(lexicalChain.getLexicalChain());
   setThreshold(DEFAULT_THRESHOLD);
 }