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

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

本文整理了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

  1. /**
  2. * Initialize parameters using the provided classifier.
  3. */
  4. public void setClassifier (MaxEnt theClassifierToTrain) {
  5. // Is this necessary? What is the caller is about to set the training set to something different? -akm
  6. assert (trainingSet == null || Alphabet.alphabetsMatch(theClassifierToTrain, trainingSet));
  7. if (this.initialClassifier != theClassifierToTrain) {
  8. this.initialClassifier = theClassifierToTrain;
  9. optimizable = null;
  10. optimizer = null;
  11. }
  12. }

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

  1. /**
  2. * Initialize parameters using the provided classifier.
  3. */
  4. public void setClassifier (MaxEnt theClassifierToTrain) {
  5. // Is this necessary? What is the caller is about to set the training set to something different? -akm
  6. assert (trainingSet == null || Alphabet.alphabetsMatch(theClassifierToTrain, trainingSet));
  7. if (this.initialClassifier != theClassifierToTrain) {
  8. this.initialClassifier = theClassifierToTrain;
  9. optimizable = null;
  10. optimizer = null;
  11. }
  12. }

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

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

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

  1. /**
  2. * Initialize parameters using the provided classifier.
  3. */
  4. public void setClassifier (MaxEnt theClassifierToTrain) {
  5. // Is this necessary? What is the caller is about to set the training set to something different? -akm
  6. assert (trainingSet == null || Alphabet.alphabetsMatch(theClassifierToTrain, trainingSet));
  7. if (this.initialClassifier != theClassifierToTrain) {
  8. this.initialClassifier = theClassifierToTrain;
  9. optimizable = null;
  10. optimizer = null;
  11. }
  12. }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  1. /**
  2. Calculates the confidence in the tagging of an {@link Instance}.
  3. */
  4. public double estimateConfidenceFor (Instance instance,
  5. Object[] startTags, Object[] inTags) {
  6. Classification c = null;
  7. if (Alphabet.alphabetsMatch(instance, this.pipe))
  8. c = this.meClassifier.classify (new SequenceConfidenceInstance (instance));
  9. else
  10. c = this.meClassifier.classify (instance);
  11. return c.getLabelVector().value (this.correct);
  12. }

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

  1. /**
  2. Calculates the confidence in the tagging of an {@link Instance}.
  3. */
  4. public double estimateConfidenceFor (Instance instance,
  5. Object[] startTags, Object[] inTags) {
  6. Classification c = null;
  7. if (Alphabet.alphabetsMatch(instance, this.pipe))
  8. c = this.meClassifier.classify (new SequenceConfidenceInstance (instance));
  9. else
  10. c = this.meClassifier.classify (instance);
  11. return c.getLabelVector().value (this.correct);
  12. }

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

  1. /**
  2. Calculates the confidence in the tagging of an {@link Instance}.
  3. */
  4. public double estimateConfidenceFor (Instance instance,
  5. Object[] startTags, Object[] inTags) {
  6. Classification c = null;
  7. if (Alphabet.alphabetsMatch(instance, this.pipe))
  8. c = this.meClassifier.classify (new SequenceConfidenceInstance (instance));
  9. else
  10. c = this.meClassifier.classify (instance);
  11. return c.getLabelVector().value (this.correct);
  12. }

相关文章