lingtools.lcm module¶
-
class
lingtools.lcm.LCMFeatures(tokenizer_obj=None, config_file=None)[source]¶ Bases:
objectExtract Linguistic Category Model features from text.
- Descriptive Action Verbs (DAV) refer to single, specific action with a clear beginning and end, such as hit, yell, and walk.
- Interpretative Action Verbs (IAV) refer to different actions with a clear beginning and end, but do not share a physical invariant feature, such as help, tease, avoid.
- State Action Verbs (SAV) refer to behavioral events, but refer to the emotional consequence of an action rather than the action itself, such as surprise, amaze, anger.
- State Verbs (SV) refer to enduring cognitive or emotional states with no clear beginning or end, such as hunger, trust, understand.
- Adjectives (ADJ) refer to a characteristic or feature qualifying a person or concept, such as distraught, optimal.
These five categories can be seen as a continuum from concreteness (DAV) to abstractness (ADJ). Semin and Fiedler (1991) proposed an aggregate of the five categories in the form of an abstractness score. This score was formed by the following straightforward formula:
\[abstractness = \frac{ (DAV + ( 2* (IAV + SAV)) + (3 * SV) + (4 * ADJ) ) } { (DAV + IAV + SAV + SV + ADJ) }\]Parameters: - tokenizer_obj (LocalTokenizer) – initialized tokenizer object
- config_file (string) – Configuration file to use (optional. See Configuration).
-
static
get_feature_names()[source]¶ Returns a list of feature names in the same order as the features returned by
get_features().Returns: list of feature names Return type: list
-
get_features(deepstruc_doc)[source]¶ Returns features for one document, in the same order as returned by
get_feature_names().Parameters: deepstruc_doc (list) – The incoming document, pre-processed as a Deep structure pos-tagged document. Returns: list of features Return type: list