Package com.aliasi.hmm

Examples of com.aliasi.hmm.TagWordLattice


     {
      logger.info("----------------- CONFIDENCE ------------------------")
      logger.info(StringTools.fillin("Token", 10, true, ' ') + StringTools.fillin("PROB: TAG", 60, true, ' '));

      //*-- get the lattice of tag scores and print
      TagWordLattice lattice = decoder.lattice(tokens);
      for (int i = 0; i < tokens.length; ++i)
       {
        StringBuffer sb = new StringBuffer();
        ScoredObject[] tagScores = lattice.log2ConditionalTags(i);
        sb.append(StringTools.fillin(tokens[i], 10, true, ' '));
        for (int j = 0; j < 3; ++j)
         { double logProb = tagScores[j].score();
           double conditionalProb = Math.pow(2.0,logProb);
           String tag = (String) tagScores[j].getObject();
View Full Code Here

TOP

Related Classes of com.aliasi.hmm.TagWordLattice

Copyright © 2018 www.massapicom. 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.