//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET: //ORIGINAL LINE: public System.Nullable<int> getDefaultRootLabelCode(org.maltparser.core.symbol.SymbolTable table) throws org.maltparser.core.exception.MaltChainedException public virtual int? getDefaultRootLabelCode(SymbolTable table) { int? res = rootLabelCodes.get(table); if (res == null) { return table.addSymbol(DEFAULT_ROOTSYMBOL); } return res; }
/// <summary> /// Returns the label symbol(a string representation) of the symbol table if it exists, otherwise /// an exception is thrown. /// </summary> /// <param name="table"> the symbol table </param> /// <returns> the label (a string representation) of the symbol table if it exists. </returns> /// <exception cref="MaltChainedException"> </exception> //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET: //ORIGINAL LINE: public String getLabelSymbol(org.maltparser.core.symbol.SymbolTable table) throws org.maltparser.core.exception.MaltChainedException public virtual string getLabelSymbol(SymbolTable table) { int?code = labelSet.get(table); if (code == null) { throw new SyntaxGraphException("No label symbol available for label '" + table.Name + "'."); } return(table.getSymbolCodeToString(code.Value)); }
public virtual bool checkRootLabelCodes(LabelSet rlc) { if (rlc == null && rootLabelCodes == null) { return true; // or false ? } else if ((rlc == null && rootLabelCodes != null) || (rlc != null && rootLabelCodes == null)) { return false; } else if (rlc.size() != rootLabelCodes.size()) { return false; } else { foreach (SymbolTable table in rootLabelCodes.Keys) { if (!rootLabelCodes.get(table).Equals(rlc.get(table))) { return false; } } return true; } }
/// <summary> /// Adds the labels of the label set to the label set of the graph element. /// </summary> /// <param name="labels"> a label set. </param> /// <exception cref="MaltChainedException"> </exception> //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET: //ORIGINAL LINE: public void addLabel(LabelSet labels) throws org.maltparser.core.exception.MaltChainedException public virtual void addLabel(LabelSet labels) { if (labels != null) { foreach (SymbolTable table in labels.Keys) { addLabel(table, labels.get(table)); } } }