Gives the probability of a tag at a single position conditioned on a
sequence of previous labels.

@param position
Index in sequence
@param label
Label of item at index
@param prevLabels
@return conditional log probability
496298
public double condLogProbGivenPrevious(int position, int label, int[] prevLabels) {
    if (prevLabels.length + 1 == windowSize) {
      return factorTables[position].conditionalLogProbGivenPrevious(prevLabels, label);
    } else if (prevLabels.length + 1 < windowSize) {
      FactorTable ft = factorTables[position].sumOutFront();
      while (ft.windowSize() > prevLabels.length + 1) {
        ft = ft.sumOutFront();
      }
      return ft.conditionalLogProbGivenPrevious(prevLabels, label);
    } else {
      int[] p = new int[windowSize - 1];
      System.arraycopy(prevLabels, prevLabels.length - p.length, p, 0, p.length);
      return factorTables[position].conditionalLogProbGivenPrevious(p, label);
    }
  }
1088376
public void addSequenceLabel(@NonNull T label) {
        this.labels.add(label);
        if (this.label == null)
            this.label = label;
    }
999776
public ListIterator<IWord> findFirstWordIteratorByLabel(String label)
    {
        ListIterator<IWord> listIterator = this.wordList.listIterator();
        while (listIterator.hasNext())
        {
            IWord word = listIterator.next();
            if (label.equals(word.getLabel()))
            {
                return listIterator;
            }
        }
        return null;
    }
1083872
@Override
    public int indexOf(String label) {
        T token = tokenFor(label);
        if (token != null) {
            return token.getIndex();
        } else
            return -2;
    }
1073357
public IWord findFirstWordByLabel(String label)
    {
        for (IWord word : this)
        {
            if (label.equals(word.getLabel()))
            {
                return word;
            }
        }
        return null;
    }
942960
public void calculateLabelPrior() {
        double prior = 1D / model.labelIndexer.getLabelSize();
        model.labelIndexer.getIndexSet().forEach(labelIndex -> model.labelPrior.put(labelIndex, prior));
    }
1013419
public Expression labelStart(final Label label) {
    return new Expression(resultType(), features) {
      @Override
      protected void doGen(CodeBuilder adapter) {
        adapter.mark(label);
        Expression.this.gen(adapter);
      }
    };
  }
155314
private void checkLabels(boolean forGenerative, String... label)
	{
		for (int i = 0; i < (forGenerative ? label.length - 1 : label.length); i++)
		{
			if (!hasLabel(label[i])) throw new IllegalArgumentException(
				"Label neither found, nor generated: " + label[i]);
		}
	}
1301245
public ObjectErrorBuilder label(final Optional<String> label) {
        label.ifPresent(l -> label(l));
        return this;
    }
373343
public void selectByLabel(String label) {
        getDispatcher().beforeSelect(this, label);
        
        new Select(getElement()).selectByVisibleText(label);
        if (Config.getBoolConfigProperty(ConfigProperty.ENABLE_GUI_LOGGING)) {
            logUIActions(UIActions.SELECTED, label);
        }
        
        getDispatcher().afterSelect(this, label);
    }
1028660
public BioPAXElement get(String label, Pattern p)
	{
		return variables[p.indexOf(label)];
	}
893568
public Child labels(String... labelValues) {
    if (labelValues.length != labelNames.size()) {
      throw new IllegalArgumentException("Incorrect number of labels.");
    }
    for (String label: labelValues) {
      if (label == null) {
        throw new IllegalArgumentException("Label cannot be null.");
      }
    }
    List<String> key = Arrays.asList(labelValues);
    Child c = children.get(key);
    if (c != null) {
      return c;
    }
    Child c2 = newChild();
    Child tmp = children.putIfAbsent(key, c2);
    return tmp == null ? c2 : tmp;
  }
110225
public Float getGroupingFloat(String label) {
        PrimitiveObject o = getPrimitiveObject(KEY, label, ObjectUtil.FLOAT, "Float");
        if (o == null) {
            return null;
        }
        return (Float) o.getObject();
    }
1259305
public int add(T label,float score) {
		int i = 0;
		int ret = i;
		if (n != 0) {
			for (i = 0; i < n; i++) {
				if (score > scores[i])
					break;
			}
			if (i != n || n < scores.length) {
				for (int k = n - 2; k >= i; k--) {
					scores[k + 1] = scores[k];
					labels[k + 1] = labels[k];
				}
				ret = i;
			}else	 if (n < scores.length)	{

			}else	{
				ret = -1;
			}
		}
		if(ret!=-1){
			scores[i] = score;
			labels[i] = label;
		}
		if (n < scores.length)
			n++;
		return ret;
	}
1048689
public InstructionHandle getLabeledInstruction(String label) {
        PatternElementMatch first = getFirstLabeledMatch(label);
        return first != null ? first.getMatchedInstructionInstructionHandle() : null;
    }
98259
public final synchronized void setLabel(String label) {
        if(label == null) {
            throw new IllegalArgumentException("null label to a button is not allowed");
        }
        if(label.isEmpty()) {
            label = " ";
        }
        this.label = label;
        invalidate();
    }
297675
public Byte getValueByte(String label) {
        PrimitiveObject o = getPrimitiveObject(VALUE, label, ObjectUtil.BYTE, "Byte");
        if (o == null) {
            return null;
        }
        return (Byte) o.getObject();
    }