擅长:python、mysql、java
<pre><code>It is not clear how to separate sentences since there is no punctuation. But suppose we know how to. Then just use Counter from collection.
data = '''
This is a cat
we are working at BusinessBrio
Gitu is my beloved cat
Jery is also a cat
Boni is a nice dog
Gitu is my beloved cat
we are working at BusinessBrio
This is a cat
we are working at BusinessBrio
Gitu is my beloved cat
Jery is also a cat
Boni is a nice dog
Gitu is my beloved cat
we are working at BusinessBrio
'''
li = data.split('\n')
from collections import Counter
pp(Counter(li))
Counter({'we are working at BusinessBrio': 4,
'Gitu is my beloved cat': 4,
'Boni is a nice dog': 2,
'This is a cat': 2,
'Jery is also a cat': 2,
'': 1,
' ': 1})
</code></pre>