I cant n-grams and build a dictionary to store n-gram values. I have something like this:
{ "it is" : 0.01, "this is" : 0.005, "hello i" : 0.2 "hello you" : 0.3 ... }
There are 3 million keys in my dictionary, and it takes 0.0002(s) to get the bigramvalue value.
Is there anything faster than a dict that I could use?
source share