Extends
Members
(static) morpheme_n_grams_mapReduce :function
- Source:
[morpheme_n_grams_mapReduce description]
Type:
- function
findRelevantSegmentationContexts
- Source:
Find the this.morphemeSegmentationKnowledgeBase which match in local precedence
morphemefinder
- Source:
Takes in an utterance line and, based on our current set of precendence
self.morphemeSegmentationKnowledgeBase, guesses what the morpheme line would be. The algorithm is
very conservative.
morphemeSegmentationKnowledgeBaseGraph
- Source:
Takes as a parameters an array of self.morphemeSegmentationKnowledgeBase which came from CouchDB precedence rule query.
Example Rule: {"key":{"x":"@","relation":"precedes","y":"aqtu","context":"aqtu-nay-wa-n"},"value":2}
Methods
(static) calculateAllAlternativeCombinations(options) → {Object}
- Source:
Finds all combinations of an utterance line by looping through all
possible parses of all words in the utterance line.
This results in a list of alternateMorphemeLines which can be shown to the user
as a type-ahead on the utterance line.
These alternateMorphemeLines can be further filtered using other information
(likelyhood of long distance relationships between morphemes,
likelyhood of long distance relationships between glosses).
http://stackoverflow.com/questions/15298912/javascript-generating-combinations-from-n-arrays-with-m-elements
Parameters:
Name | Type | Description |
---|---|---|
options |
Object | An object containing metadata, options.columns is used to generate the combinations options.sort is optionally used to sort the resulting combinations |
Returns:
[description]
- Type
- Object
(static) removeRedundantCopies(input) → {Array}
- Source:
Removes redundant copies from an array
Parameters:
Name | Type | Description |
---|---|---|
input |
Array | An array to be cleaned |
Returns:
The same array after removing redundant copies
- Type
- Array
(static) sortAlternatesByLessSegmentation(a, b) → {boolean}
- Source:
If passed to a alternateMorphemeLines.map() results in a sort order where fewer segmentations
are listed first (on top in a typeahead).
This is useful if the user prefers to see segmentations, but will most often
choose the utteracne line as the morphemes line and then add the segmentations
themself.
Parameters:
Name | Type | Description |
---|---|---|
a |
String | A string (normallly a morphemes line) |
b |
String | A string (normallly a morphemes line) |
Returns:
If a has more segmentations than b
- Type
- boolean
(static) sortAlternatesByMoreSegmentation(a, b) → {boolean}
- Source:
If passed to a alternateMorphemeLines.map() results in a sort order where more
segmentations are listed first (on top in a typeahead).
This is only useful if the user doesn't realize that the app can segment
the utterance line, and/or if the glosser's segmentations are conservative
and only offer real segmentations.
Parameters:
Name | Type | Description |
---|---|---|
a |
String | A string (normallly a morphemes line) |
b |
String | A string (normallly a morphemes line) |
Returns:
If a has more segmentations than b
- Type
- boolean