public class LabelValidator extends Object
| Constructor and Description |
|---|
LabelValidator(LanguageLabelSetDescriptor.GrammaticalLabelSetDescriptor baseDesc,
GrammaticalLabelSetProvider parentSet) |
| Modifier and Type | Method and Description |
|---|---|
List<String> |
getDuplicates(HumanLanguage language) |
List<String> |
getInvalidAliases(HumanLanguage language) |
List<String> |
getInvalidLabels(HumanLanguage language) |
GrammaticalLabelFileParser |
getParser(HumanLanguage language,
boolean trackDupes) |
GrammaticalLabelSet |
getTestLabelSet(HumanLanguage language,
String text,
String grammarOverride) |
LanguageDictionary |
loadDictionary(LanguageLabelSetDescriptor.GrammaticalLabelSetDescriptor dictDesc) |
String |
renderDynamicLabel(HumanLanguage language,
String text,
Renameable... entities) |
String |
renderLabel(HumanLanguage language,
String text) |
String |
renderLabel(HumanLanguage language,
String text,
String grammarOverride)
Render the label for the given language with the appropriate override
|
List<String> |
validateReferencedCaseFormsExistTest(List<GrammaticalLabelSet> sets)
Validate that the referenced case forms exist for the nouns in the label sets
|
public LabelValidator(LanguageLabelSetDescriptor.GrammaticalLabelSetDescriptor baseDesc, GrammaticalLabelSetProvider parentSet)
public List<String> getInvalidAliases(HumanLanguage language) throws IOException
IOExceptionpublic List<String> getDuplicates(HumanLanguage language) throws IOException
IOExceptionpublic List<String> getInvalidLabels(HumanLanguage language) throws Exception
Exceptionpublic List<String> validateReferencedCaseFormsExistTest(List<GrammaticalLabelSet> sets)
sets - the label sets to validatepublic GrammaticalLabelFileParser getParser(HumanLanguage language, boolean trackDupes) throws IOException
language - the language to load for the parserIOException - if there was a problem while parsingpublic String renderLabel(HumanLanguage language, String text) throws IOException
IOExceptionpublic String renderLabel(HumanLanguage language, String text, String grammarOverride) throws IOException
IOExceptionpublic String renderDynamicLabel(HumanLanguage language, String text, Renameable... entities) throws IOException
IOExceptionpublic GrammaticalLabelSet getTestLabelSet(HumanLanguage language, String text, String grammarOverride) throws IOException
IOExceptionpublic LanguageDictionary loadDictionary(LanguageLabelSetDescriptor.GrammaticalLabelSetDescriptor dictDesc) throws IOException
IOExceptionCopyright (c) 2016-2017, Salesforce.com, Inc. All rights reserved. Licensed under the BSD 3-Clause license. For full license text, see the LICENSE.txt file in the repository.