示例#1
0
  /**
   * Creates a deep copy of the cluster: segments in the new cluster are copies of the original
   * segments, not references.
   *
   * @return the object
   */
  @Override
  public Cluster clone() {
    Cluster result = null;
    try {
      result = (Cluster) (super.clone());
    } catch (CloneNotSupportedException e) {
      logger.log(Level.SEVERE, "", e);
      e.printStackTrace();
    }
    result.segmentSet = new TreeSet<Segment>();
    for (Segment segment : segmentSet) {
      result.segmentSet.add((segment.clone()));
    }
    result.informationMap = new TreeMap<String, Object>(new StringComparator());
    for (String key : informationMap.keySet()) {
      result.setInformation(key, informationMap.get(key));
    }

    result.modelScores = new ModelScores();
    for (String key : modelScores.keySet()) {
      result.modelScores.put(key, modelScores.get(key));
    }

    result.speakerNameSet = (SpeakerNameSet) speakerNameSet.clone();

    return result;
  }
示例#2
0
 /**
  * Information of the cluster.
  *
  * @param level the level
  */
 public void debug(int level) {
   logger.fine(
       "name= "
           + getName()
           + " gender= "
           + getGender()
           + " channel= "
           + getChannel()
           + " Length= "
           + getLength()
           + " info= "
           + getInformations());
   speakerNameSet.debug();
   for (Segment segment : segmentSet) {
     segment.debug(level);
   }
 }
示例#3
0
 /**
  * Gets the maximum scoreCluster for the given real speaker name.
  *
  * @return the maximum scoreCluster for the given real speaker name.
  */
 public SpeakerName getMaxSpeakerName() {
   return speakerNameSet.getMaxScore();
 }
示例#4
0
 /**
  * Compute sum.
  *
  * @throws Exception the exception
  */
 public void computeSum() throws Exception {
   speakerNameSet.computeSum();
 }
示例#5
0
 /**
  * Removes a SpeakerSame instance according the given real speaker name.
  *
  * @param name the real speaker name
  */
 public void RemoveSpeakerName(String name) {
   speakerNameSet.remove(name);
 }
示例#6
0
 /**
  * Compute belief functions of the scoreCluster of speaker name set.
  *
  * @throws Exception the exception
  */
 public void computeBeliefFunctions() throws Exception {
   speakerNameSet.computeBeliefFunctions();
 }
示例#7
0
 /** Mean the scoreCluster of speaker name set. */
 public void computeMeanScore() {
   speakerNameSet.meanScoreCluster();
 }
示例#8
0
 /** Normalize the scoreCluster of speaker name set. */
 public void computeNormalizedScore() {
   speakerNameSet.normalizeScoreCluster();
 }
示例#9
0
 /**
  * Gets the speaker name.
  *
  * @param name the name of the real speaker name
  * @return the SpeakerName instance
  */
 public SpeakerName getSpeakerName(String name) {
   return speakerNameSet.get(name);
 }
示例#10
0
 /** Clear speaker name set. */
 public void clearSpeakerNameSet() {
   speakerNameSet.clear();
 }