If _size is sufficiently smaller than the array length so that substantial space would be saved, then reallocate the array length to be max(_size,_initialCapacity), and return true.
If _size is sufficiently smaller than the array length so that substantial space would be saved, then reallocate the array length to be max(_size,_initialCapacity), and return true. Otherwise return false.
If true, do not allow this domain to change.
If true, do not allow this domain to change.
Return the index at which value i should be inserted in order to maintain sorted order.
Return the index at which value i should be inserted in order to maintain sorted order. This assumes that the existing elements already already sorted. If value i is already present, return its index.
Return the index containing the value i, or -1 if i is not found.
Return the index containing the value i, or -1 if i is not found.
Return the index containing the value i, or -1 if i is not found.
Return the index containing the value i, or -1 if i is not found. Do so more efficiently by assuming that the contents are sorted in ascending order. Look by starting near the last index as which a search was successful.
Reallocate the array to be exactly 'cap' or _initialCapacity, whichever is bigger.
Reallocate the array to be exactly 'cap' or _initialCapacity, whichever is bigger.
Return the CategoricalValue at index i.
Return the CategoricalValue at index i.
Wipe the domain, its elements, indices and counts clean
Wipe the domain, its elements, indices and counts clean
A convenience method to get the size of the dimensionDomain.
A convenience method to get the size of the dimensionDomain. This method is often used to determine the dimensions of parameter Weights Tensors to allocate.
Can new category values be added to this Domain?
Can new category values be added to this Domain?
If true, then each call to CategoricalDomain.index will increment a count associated with value in the domain.
If true, then each call to CategoricalDomain.index will increment a count associated with value in the domain. This count can then later be used to trim the set of domain values by various thresholds.
Like index, but throw an exception if the category is not already there.
Like index, but throw an exception if the category is not already there.
Return the integer associated with the category, and also, if gatherCounts is true, also increment the count of category.
Return the integer associated with the category, and also, if gatherCounts is true, also increment the count of category. If the category is not already in this CategoricalDomain and 'frozen' is false, and 'mazSize' will not be exceeded, then add the category to this CategoricalDomain. This method is thread-safe so that multiple threads may read and index data simultaneously.
Return the integer associated with the category, do not increment the count of category, even if gatherCounts is true.
Return the integer associated with the category, do not increment the count of category, even if gatherCounts is true.
Return the integer associated with the category, and also (whether or not 'gatherCounts' is true') increment by 'count' the number of times this Domain says the category has been seen.
Return the integer associated with the category, and also (whether or not 'gatherCounts' is true') increment by 'count' the number of times this Domain says the category has been seen. If the category is not already in this CategoricalDomain and 'frozen' is false, and 'mazSize' will not be exceeded, then add the category to this CategoricalDomain. This method is thread-safe so that multiple threads may read and index data simultaneously.
If positive, throw error if size tries to grow larger than it.
If positive, throw error if size tries to grow larger than it. Use for growable multi-dim Factor weightsSet; override this method with the largest you think your growable domain will get.
(Changed in version 2.9.0) The behavior of scanRight
has changed. The previous behavior can be reproduced with scanRight.reverse.
Return the number of unique entries with count equal to 'c'.
Return the number of unique entries with count equal to 'c'.
Return the number of unique entries with count greater than or equal to 'threshold'.
Return the number of unique entries with count greater than or equal to 'threshold'. This returned value will be the size of the Domain after a call to trimBelowCount(threshold).
Return the number of unique entries with count below 'threshold'.
Return the number of unique entries with count below 'threshold'.
If type T is not string, this should be overridden to provide de-serialization
If type T is not string, this should be overridden to provide de-serialization
(Changed in version 2.9.0) transpose
throws an IllegalArgumentException
if collections are not uniformly sized.
Returns the number of unique entries trimmed
Returns the number of unique entries trimmed
Returns the number of unique entries trimmed
Returns the number of unique entries trimmed
Returns the count threshold below which entries were discarded.
Returns the count threshold below which entries were discarded.
Return the CategoricalValue associated with the given category.
Return the CategoricalValue associated with the given category. If the category is not already in this CategoricalDomain and 'frozen' is false, and 'mazSize' will not be exceeded, then add the category to this CategoricalDomain. This method is thread-safe so that multiple threads may read and index data simultaneously.
The "A Universal Part-of-Speech Tagset" by Slav Petrov, Dipanjan Das and Ryan McDonald http://arxiv.org/abs/1104.2086 http://code.google.com/p/universal-pos-tags
VERB - verbs (all tenses and modes) NOUN - nouns (common and proper) PRON - pronouns ADJ - adjectives ADV - adverbs ADP - adpositions (prepositions and postpositions) CONJ - conjunctions DET - determiners NUM - cardinal numbers PRT - particles or other function words X - other: foreign words, typos, abbreviations . - punctuation