public Pipe getPipe() { return new Noop(dataAlphabet, targetAlphabet); }
public Pipe getPipe() { return new Noop(dataAlphabet, targetAlphabet); }
public CRFExtractor (File crfFile) throws IOException { this (loadCrf(crfFile), new Noop ()); }
public CRFExtractor (File crfFile) throws IOException { this (loadCrf(crfFile), new Noop ()); }
public CRFExtractor (File crfFile) throws IOException { this (loadCrf(crfFile), new Noop ()); }
public CRF (Alphabet inputAlphabet, Alphabet outputAlphabet) { super (new Noop(inputAlphabet, outputAlphabet), null); inputAlphabet.stopGrowth(); logger.info ("CRF input dictionary size = "+inputAlphabet.size()); //xxx outputAlphabet.stopGrowth(); this.inputAlphabet = inputAlphabet; this.outputAlphabet = outputAlphabet; }
public CRF (Alphabet inputAlphabet, Alphabet outputAlphabet) { super (new Noop(inputAlphabet, outputAlphabet), null); inputAlphabet.stopGrowth(); logger.info ("CRF input dictionary size = "+inputAlphabet.size()); //xxx outputAlphabet.stopGrowth(); this.inputAlphabet = inputAlphabet; this.outputAlphabet = outputAlphabet; }
public CRF (Alphabet inputAlphabet, Alphabet outputAlphabet) { super (new Noop(inputAlphabet, outputAlphabet), null); inputAlphabet.stopGrowth(); logger.info ("CRF input dictionary size = "+inputAlphabet.size()); //xxx outputAlphabet.stopGrowth(); this.inputAlphabet = inputAlphabet; this.outputAlphabet = outputAlphabet; }
public LDAInstanceList(FastPreferenceData<U, I> preferences) { super(new Noop()); this.preferences = preferences; this.alphabet = new LDAAlphabet(preferences.numItems()); }
/** * * @param i * @param j * @return A new {@link InstanceList} containing the two argument {@link Instance}s. */ public static InstanceList makeList (Instance i, Instance j) { InstanceList list = new InstanceList(new Noop(i.getDataAlphabet(), i.getTargetAlphabet())); list.add(i); list.add(j); return list; }
/** * * @param i * @param j * @return A new {@link InstanceList} containing the two argument {@link Instance}s. */ public static InstanceList makeList (Instance i, Instance j) { InstanceList list = new InstanceList(new Noop(i.getDataAlphabet(), i.getTargetAlphabet())); list.add(i); list.add(j); return list; }
/** Iterates over {@link Segment}s for only one {@link Instance}. */ public SegmentIterator (Transducer model, Instance instance, Object[] segmentStartTags, Object[] segmentContinueTags) { InstanceList ilist = new InstanceList (new Noop (instance.getDataAlphabet(), instance.getTargetAlphabet())); ilist.add (instance); setSubIterator (model, ilist, segmentStartTags, segmentContinueTags); }
/** Iterates over {@link Segment}s for only one {@link Instance}. */ public SegmentIterator (Transducer model, Instance instance, Object[] segmentStartTags, Object[] segmentContinueTags) { InstanceList ilist = new InstanceList (new Noop (instance.getDataAlphabet(), instance.getTargetAlphabet())); ilist.add (instance); setSubIterator (model, ilist, segmentStartTags, segmentContinueTags); }
/** Iterates over {@link Segment}s for only one {@link Instance}. */ public SegmentIterator (Transducer model, Instance instance, Object[] segmentStartTags, Object[] segmentContinueTags) { InstanceList ilist = new InstanceList (new Noop (instance.getDataAlphabet(), instance.getTargetAlphabet())); ilist.add (instance); setSubIterator (model, ilist, segmentStartTags, segmentContinueTags); }
/** * * @param i * @param j * @return A new {@link InstanceList} containing the two argument {@link Instance}s. */ public static InstanceList makeList (Instance i, Instance j) { InstanceList list = new InstanceList(new Noop(i.getDataAlphabet(), i.getTargetAlphabet())); list.add(i); list.add(j); return list; }
public NaiveBayes trainIncremental (Instance instance) { setup (null, instance); // Incrementally add the counts of this new training instance incorporateOneInstance (instance, 1.0); if (instancePipe == null) instancePipe = new Noop (dataAlphabet, targetAlphabet); classifier = new NaiveBayes (instancePipe, pe.estimate(), estimateFeatureMultinomials()); return classifier; }
public NaiveBayes trainIncremental (Instance instance) { setup (null, instance); // Incrementally add the counts of this new training instance incorporateOneInstance (instance, 1.0); if (instancePipe == null) instancePipe = new Noop (dataAlphabet, targetAlphabet); classifier = new NaiveBayes (instancePipe, pe.estimate(), estimateFeatureMultinomials()); return classifier; }
public NaiveBayes trainIncremental (Instance instance) { setup (null, instance); // Incrementally add the counts of this new training instance incorporateOneInstance (instance, 1.0); if (instancePipe == null) instancePipe = new Noop (dataAlphabet, targetAlphabet); classifier = new NaiveBayes (instancePipe, pe.estimate(), estimateFeatureMultinomials()); return classifier; }
public void testParenGroupIterator () { String input = "(a (b c) ((d)) ) f\n\n (3\n 4) ( 6) "; Reader reader = new StringReader (input); ParenGroupIterator it = new ParenGroupIterator (reader); Pipe pipe = new Noop(); pipe.setTargetProcessing (false); InstanceList lst = new InstanceList (pipe); lst.addThruPipe (it); assertEquals (3, lst.size()); assertEquals ("(a (b c) ((d)) )", lst.get(0).getData()); assertEquals ("(3\n 4)", lst.get(1).getData()); assertEquals ("( 6)", lst.get(2).getData()); }
public void testParenGroupIterator () { String input = "(a (b c) ((d)) ) f\n\n (3\n 4) ( 6) "; Reader reader = new StringReader (input); ParenGroupIterator it = new ParenGroupIterator (reader); Pipe pipe = new Noop(); pipe.setTargetProcessing (false); InstanceList lst = new InstanceList (pipe); lst.addThruPipe (it); assertEquals (3, lst.size()); assertEquals ("(a (b c) ((d)) )", lst.get(0).getData()); assertEquals ("(3\n 4)", lst.get(1).getData()); assertEquals ("( 6)", lst.get(2).getData()); }