Package cc.mallet.pipe

Examples of cc.mallet.pipe.Noop


     @return array of {@link Segment}s ordered by non-decreasing
     confidence scores, as calculated by <code>estimateConfidenceFor</code>
   */
  public Segment[] rankSegmentsByConfidence (Instance instance, Object[] startTags,
                                             Object[] continueTags) {
    InstanceList ilist = new InstanceList (new Noop(instance.getDataAlphabet(),instance.getTargetAlphabet()));
    ilist.add (instance);
    return rankSegmentsByConfidence (ilist, startTags, continueTags);
  }
View Full Code Here


  /**
     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);
  }
View Full Code Here

     @param segmentContinueTags array of tags indicating the continuation of a segment
     @param predictions list of {@link Sequence}s that are the
     predicted output of some {@link Transducer}
   */
  public SegmentIterator (Instance instance, Object[] startTags, Object[] inTags,  Sequence prediction) {
    InstanceList ilist = new InstanceList (new Noop (instance.getDataAlphabet(), instance.getTargetAlphabet()));
    ilist.add (instance);
    ArrayList predictions = new ArrayList();
    predictions.add (prediction);
    setSubIterator (ilist, startTags, inTags, predictions);
  }
View Full Code Here

        // Create a "fake" pipe with the features in the data and
        //  a trove int-int hashmap of topic counts in the target.
       
        if (parameterPipe == null) {
            parameterPipe = new Noop();

            parameterPipe.setDataAlphabet(data.get(0).instance.getTargetAlphabet());
            parameterPipe.setTargetAlphabet(topicAlphabet);
        }
View Full Code Here

  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());
View Full Code Here

        // Create a "fake" pipe with the features in the data and
        //  a trove int-int hashmap of topic counts in the target.
       
        if (parameterPipe == null) {
            parameterPipe = new Noop();

            parameterPipe.setDataAlphabet(data.get(0).instance.getTargetAlphabet());
            parameterPipe.setTargetAlphabet(topicAlphabet);
        }
View Full Code Here

    //inputAlphabet.stopGrowth();
  }

  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;
View Full Code Here

TOP

Related Classes of cc.mallet.pipe.Noop

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.