101 karma · joined January 20, 2019
It's true that the actions of single individuals cannot be fully predicted, but that's not necessary. Any level of insight is enough to form the basis of a scientific theory. In other words, mainstream economists do not claim that they can perfectly model human behavior, but they do (rightly) claim that they can make educated guesses which are correct more often than not.
1. Split the text into words
2. Rank each word based on how many times it appears in the text. For example, a word that appears 10 times gets 10 points, and so on.
3. Rank sentences based on the sum of the scores of each word inside them.
4. Return the top N sentences by score (N is up to the user), in the order in which they appear in the text.
For extra fancyness, exclude the most common articles and prepositions and give 2 points to proper nouns.
Works surprisingly well.