cc.mallet.types.Alphabet.alphabetsMatch()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(6.4k)|赞(0)|评价(0)|浏览(80)

本文整理了Java中cc.mallet.types.Alphabet.alphabetsMatch()方法的一些代码示例,展示了Alphabet.alphabetsMatch()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Alphabet.alphabetsMatch()方法的具体详情如下:
包路径:cc.mallet.types.Alphabet
类名称:Alphabet
方法名:alphabetsMatch

Alphabet.alphabetsMatch介绍

[英]Convenience method that can often implement alphabetsMatch in classes that implement the AlphabetsCarrying interface.
[中]方便的方法,通常可以在实现Alphabets接口的类中实现alphabetsMatch。

代码示例

代码示例来源:origin: de.julielab/jcore-mallet-2.0.9

/**
 *  Initialize parameters using the provided classifier. 
 */
public void setClassifier (MaxEnt theClassifierToTrain) {
  // Is this necessary?  What is the caller is about to set the training set to something different? -akm
  assert (trainingSet == null || Alphabet.alphabetsMatch(theClassifierToTrain, trainingSet));
  if (this.initialClassifier != theClassifierToTrain) {
    this.initialClassifier = theClassifierToTrain;
    optimizable = null;
    optimizer = null;
  }
}

代码示例来源:origin: com.github.steveash.mallet/mallet

/**
 *  Initialize parameters using the provided classifier. 
 */
public void setClassifier (MaxEnt theClassifierToTrain) {
  // Is this necessary?  What is the caller is about to set the training set to something different? -akm
  assert (trainingSet == null || Alphabet.alphabetsMatch(theClassifierToTrain, trainingSet));
  if (this.initialClassifier != theClassifierToTrain) {
    this.initialClassifier = theClassifierToTrain;
    optimizable = null;
    optimizer = null;
  }
}

代码示例来源:origin: com.github.steveash.mallet/mallet

/** Change the default Pipe associated with InstanceList.
 * This method is very dangerous and should only be used in extreme circumstances!! */
public void setPipe(Pipe p) {
  assert (Alphabet.alphabetsMatch(this, p));
  pipe = p;
}

代码示例来源:origin: cc.mallet/mallet

/**
 *  Initialize parameters using the provided classifier. 
 */
public void setClassifier (MaxEnt theClassifierToTrain) {
  // Is this necessary?  What is the caller is about to set the training set to something different? -akm
  assert (trainingSet == null || Alphabet.alphabetsMatch(theClassifierToTrain, trainingSet));
  if (this.initialClassifier != theClassifierToTrain) {
    this.initialClassifier = theClassifierToTrain;
    optimizable = null;
    optimizer = null;
  }
}

代码示例来源:origin: cc.mallet/mallet

/** Change the default Pipe associated with InstanceList.
 * This method is very dangerous and should only be used in extreme circumstances!! */
public void setPipe(Pipe p) {
  assert (Alphabet.alphabetsMatch(this, p));
  pipe = p;
}

代码示例来源:origin: de.julielab/jcore-mallet-2.0.9

/** Change the default Pipe associated with InstanceList.
 * This method is very dangerous and should only be used in extreme circumstances!! */
public void setPipe(Pipe p) {
  assert (Alphabet.alphabetsMatch(this, p));
  pipe = p;
}

代码示例来源:origin: cc.mallet/mallet

public boolean alphabetsMatch(AlphabetCarrying object) {
  return Alphabet.alphabetsMatch (this, object);
}

代码示例来源:origin: com.github.steveash.mallet/mallet

public boolean alphabetsMatch(AlphabetCarrying object) {
  return Alphabet.alphabetsMatch (this, object);
}

代码示例来源:origin: com.github.steveash.mallet/mallet

public boolean alphabetsMatch(AlphabetCarrying object) {
  return Alphabet.alphabetsMatch (this, object);
}

代码示例来源:origin: cc.mallet/mallet

public boolean alphabetsMatch(AlphabetCarrying object) {
  return Alphabet.alphabetsMatch (this, object);
}

代码示例来源:origin: cc.mallet/mallet

public boolean alphabetsMatch(AlphabetCarrying object) {
  return Alphabet.alphabetsMatch (this, object);
}

代码示例来源:origin: de.julielab/jcore-mallet-2.0.9

/**
  *  Create a LabelsSequence from an array.  The array is shallow-copied.
  */
 public LabelsSequence (Labels[] seq)
 {
   for (int i = 0; i < seq.length-1; i++)
     if (!Alphabet.alphabetsMatch(seq[i], seq[i+1])) 
       throw new IllegalArgumentException ("Alphabets do not match");
   this.seq = new Labels[seq.length];
   System.arraycopy (seq, 0, this.seq, 0, seq.length);
 }

代码示例来源:origin: de.julielab/jcore-mallet-2.0.9

public Labelings (Labeling[] labels)
{
  for (int i = 0; i < labels.length-1; i++)
    if (!Alphabet.alphabetsMatch(labels[i], labels[i+1])) 
      throw new IllegalArgumentException ("Alphabets do not match");
  this.labels = new Labeling[labels.length];
  System.arraycopy (labels, 0, this.labels, 0, labels.length);
}

代码示例来源:origin: cc.mallet/mallet

public Labelings (Labeling[] labels)
{
  for (int i = 0; i < labels.length-1; i++)
    if (!Alphabet.alphabetsMatch(labels[i], labels[i+1])) 
      throw new IllegalArgumentException ("Alphabets do not match");
  this.labels = new Labeling[labels.length];
  System.arraycopy (labels, 0, this.labels, 0, labels.length);
}

代码示例来源:origin: com.github.steveash.mallet/mallet

/**
  *  Create a LabelsSequence from an array.  The array is shallow-copied.
  */
 public LabelsSequence (Labels[] seq)
 {
   for (int i = 0; i < seq.length-1; i++)
     if (!Alphabet.alphabetsMatch(seq[i], seq[i+1])) 
       throw new IllegalArgumentException ("Alphabets do not match");
   this.seq = new Labels[seq.length];
   System.arraycopy (seq, 0, this.seq, 0, seq.length);
 }

代码示例来源:origin: cc.mallet/mallet

/**
  *  Create a LabelsSequence from an array.  The array is shallow-copied.
  */
 public LabelsSequence (Labels[] seq)
 {
   for (int i = 0; i < seq.length-1; i++)
     if (!Alphabet.alphabetsMatch(seq[i], seq[i+1])) 
       throw new IllegalArgumentException ("Alphabets do not match");
   this.seq = new Labels[seq.length];
   System.arraycopy (seq, 0, this.seq, 0, seq.length);
 }

代码示例来源:origin: com.github.steveash.mallet/mallet

public Labelings (Labeling[] labels)
{
  for (int i = 0; i < labels.length-1; i++)
    if (!Alphabet.alphabetsMatch(labels[i], labels[i+1])) 
      throw new IllegalArgumentException ("Alphabets do not match");
  this.labels = new Labeling[labels.length];
  System.arraycopy (labels, 0, this.labels, 0, labels.length);
}

代码示例来源:origin: com.github.steveash.mallet/mallet

/**
   Calculates the confidence in the tagging of an {@link Instance}.
 */
public double estimateConfidenceFor (Instance instance,
                                     Object[] startTags, Object[] inTags) {        
  
  Classification c = null;
  if (Alphabet.alphabetsMatch(instance, this.pipe)) 
    c = this.meClassifier.classify (new SequenceConfidenceInstance (instance));							
  else
    c = this.meClassifier.classify (instance);
  return c.getLabelVector().value (this.correct);
}

代码示例来源:origin: cc.mallet/mallet

/**
   Calculates the confidence in the tagging of an {@link Instance}.
 */
public double estimateConfidenceFor (Instance instance,
                                     Object[] startTags, Object[] inTags) {        
  
  Classification c = null;
  if (Alphabet.alphabetsMatch(instance, this.pipe)) 
    c = this.meClassifier.classify (new SequenceConfidenceInstance (instance));							
  else
    c = this.meClassifier.classify (instance);
  return c.getLabelVector().value (this.correct);
}

代码示例来源:origin: de.julielab/jcore-mallet-2.0.9

/**
   Calculates the confidence in the tagging of an {@link Instance}.
 */
public double estimateConfidenceFor (Instance instance,
                                     Object[] startTags, Object[] inTags) {        
  
  Classification c = null;
  if (Alphabet.alphabetsMatch(instance, this.pipe)) 
    c = this.meClassifier.classify (new SequenceConfidenceInstance (instance));							
  else
    c = this.meClassifier.classify (instance);
  return c.getLabelVector().value (this.correct);
}

相关文章