/** * Set whether to keep the dictionary sorted alphabetically or not * * @param sorted true to keep the dictionary sorted */ @OptionMetadata(displayName = "Sort dictionary", description = "Sort the dictionary alphabetically", commandLineParamName = "sort", commandLineParamSynopsis = "-sort", commandLineParamIsFlag = true, displayOrder = 18) public void setKeepDictionarySorted(boolean sorted) { m_dictionaryBuilder.setSortDictionary(sorted); }
/** * Set whether to keep the dictionary sorted alphabetically or not * * @param sorted true to keep the dictionary sorted */ @OptionMetadata(displayName = "Sort dictionary", description = "Sort the dictionary alphabetically", commandLineParamName = "sort", commandLineParamSynopsis = "-sort", commandLineParamIsFlag = true, displayOrder = 18) public void setKeepDictionarySorted(boolean sorted) { m_dictionaryBuilder.setSortDictionary(sorted); }
/** * Sets the format of the input instances. * * @param instanceInfo an Instances object containing the input instance * structure (any instances contained in the object are ignored - * only the structure is required). * @return true if the outputFormat may be collected immediately * @throws Exception if the input format can't be set successfully */ @Override public boolean setInputFormat(Instances instanceInfo) throws Exception { super.setInputFormat(instanceInfo); m_dictionaryBuilder.reset(); m_dictionaryBuilder.setSortDictionary(true); m_dictionaryBuilder.setNormalize(false); m_dictionaryBuilder.setup(instanceInfo); return false; }
/** * Sets the format of the input instances. * * @param instanceInfo an Instances object containing the input instance * structure (any instances contained in the object are ignored - * only the structure is required). * @return true if the outputFormat may be collected immediately * @throws Exception if the input format can't be set successfully */ @Override public boolean setInputFormat(Instances instanceInfo) throws Exception { super.setInputFormat(instanceInfo); m_dictionaryBuilder.reset(); m_dictionaryBuilder.setSortDictionary(true); m_dictionaryBuilder.setNormalize(false); m_dictionaryBuilder.setup(instanceInfo); return false; }