String sig = lex.getUnknownWordModel().getSignature(args[i], i-3); System.out.println(args[i] + " is an unknown word. Signature with uwm " + lex.getUnknownWordModel().getUnknownLevel() + ((i == 3) ? " init": "non-init") + " is: " + sig); impos.clear();
unkCounter.incrementCount(lex.getUnknownWordModel().getSignature(word.value(), posId++));
@Override public void train(TaggedWord tw, int loc, double weight) { if (useGT) { unknownGTTrainer.train(tw, weight); } // scan data String word = tw.word(); String subString = model.getSignature(word, loc); Label tag = new Tag(tw.tag()); if ( ! c.containsKey(tag)) { c.put(tag, new ClassicCounter<>()); } c.get(tag).incrementCount(subString, weight); tc.incrementCount(tag, weight); seenEnd.add(subString); String tagStr = tw.tag(); IntTaggedWord iW = new IntTaggedWord(word, IntTaggedWord.ANY, wordIndex, tagIndex); seenCounter.incrementCount(iW, weight); if (treesRead > indexToStartUnkCounting) { // start doing this once some way through trees; // treesRead is 1 based counting if (seenCounter.getCount(iW) < 2) { IntTaggedWord iT = new IntTaggedWord(IntTaggedWord.ANY, tagStr, wordIndex, tagIndex); unSeenCounter.incrementCount(iT, weight); unSeenCounter.incrementCount(NULL_ITW, weight); } } }
String sig = lex.getUnknownWordModel().getSignature(args[i], i-3); System.out.println(args[i] + " is an unknown word. Signature with uwm " + lex.getUnknownWordModel().getUnknownLevel() + ((i == 3) ? " init": "non-init") + " is: " + sig); Set<String> tags = ErasureUtils.uncheckedCast(numb.objects());
String sig = lex.getUnknownWordModel().getSignature(args[i], i-3); System.out.println(args[i] + " is an unknown word. Signature with uwm " + lex.getUnknownWordModel().getUnknownLevel() + ((i == 3) ? " init": "non-init") + " is: " + sig); impos.clear();
String sig = lex.getUnknownWordModel().getSignature(args[i], i-3); System.out.println(args[i] + " is an unknown word. Signature with uwm " + lex.getUnknownWordModel().getUnknownLevel() + ((i == 3) ? " init": "non-init") + " is: " + sig); impos.clear();
String sig = lex.getUnknownWordModel().getSignature(args[i], i-3); System.out.println(args[i] + " is an unknown word. Signature with uwm " + lex.getUnknownWordModel().getUnknownLevel() + ((i == 3) ? " init": "non-init") + " is: " + sig); impos.clear();
@Override public void train(TaggedWord tw, int loc, double weight) { if (useGT) { unknownGTTrainer.train(tw, weight); } // scan data String word = tw.word(); String subString = model.getSignature(word, loc); Label tag = new Tag(tw.tag()); if ( ! c.containsKey(tag)) { c.put(tag, new ClassicCounter<>()); } c.get(tag).incrementCount(subString, weight); tc.incrementCount(tag, weight); seenEnd.add(subString); String tagStr = tw.tag(); IntTaggedWord iW = new IntTaggedWord(word, IntTaggedWord.ANY, wordIndex, tagIndex); seenCounter.incrementCount(iW, weight); if (treesRead > indexToStartUnkCounting) { // start doing this once some way through trees; // treesRead is 1 based counting if (seenCounter.getCount(iW) < 2) { IntTaggedWord iT = new IntTaggedWord(IntTaggedWord.ANY, tagStr, wordIndex, tagIndex); unSeenCounter.incrementCount(iT, weight); unSeenCounter.incrementCount(NULL_ITW, weight); } } }
@Override public void train(TaggedWord tw, int loc, double weight) { if (useGT) { unknownGTTrainer.train(tw, weight); } // scan data String word = tw.word(); String subString = model.getSignature(word, loc); Label tag = new Tag(tw.tag()); if ( ! c.containsKey(tag)) { c.put(tag, new ClassicCounter<>()); } c.get(tag).incrementCount(subString, weight); tc.incrementCount(tag, weight); seenEnd.add(subString); String tagStr = tw.tag(); IntTaggedWord iW = new IntTaggedWord(word, IntTaggedWord.ANY, wordIndex, tagIndex); seenCounter.incrementCount(iW, weight); if (treesRead > indexToStartUnkCounting) { // start doing this once some way through trees; // treesRead is 1 based counting if (seenCounter.getCount(iW) < 2) { IntTaggedWord iT = new IntTaggedWord(IntTaggedWord.ANY, tagStr, wordIndex, tagIndex); unSeenCounter.incrementCount(iT, weight); unSeenCounter.incrementCount(NULL_ITW, weight); } } }
@Override public void train(TaggedWord tw, int loc, double weight) { if (useGT) { unknownGTTrainer.train(tw, weight); } // scan data String word = tw.word(); String subString = model.getSignature(word, loc); Label tag = new Tag(tw.tag()); if ( ! c.containsKey(tag)) { c.put(tag, new ClassicCounter<String>()); } c.get(tag).incrementCount(subString, weight); tc.incrementCount(tag, weight); seenEnd.add(subString); String tagStr = tw.tag(); IntTaggedWord iW = new IntTaggedWord(word, IntTaggedWord.ANY, wordIndex, tagIndex); seenCounter.incrementCount(iW, weight); if (treesRead > indexToStartUnkCounting) { // start doing this once some way through trees; // treesRead is 1 based counting if (seenCounter.getCount(iW) < 2) { IntTaggedWord iT = new IntTaggedWord(IntTaggedWord.ANY, tagStr, wordIndex, tagIndex); unSeenCounter.incrementCount(iT, weight); unSeenCounter.incrementCount(NULL_ITW, weight); } } }