compare¶
- compare(text1, text2)¶
Compare two texts using the Linguistic Style Matching (LSM) [1] method
\[LSM_{preps} = 1 - \frac{|preps_1 - preps_2|}{preps_1 + preps_2 + 0.0001}\]\[LSM = \frac{ LSM_{personal pronouns} + LSM_{impersonal pronouns} + LSM_{articles} + LSM_{auxiliary verbs} + LSM_{high-frequency adverbs} + LSM_{prepositions} + LSM_{conjunctions} + LSM_{negations} + LSM_{quantifiers} }{9}\]Parameters: - text1 (string) –
- text2 (string) –
Returns: lsm
Return type: dict
References
[1] Amy L. Gonzales, Jeffrey T. Hancock, and James W. Pennebaker : Language Style Matching as a Predictor of Social Dynamics in Small Groups. Communication Research 37(1):3-19, 2010.