I am creating a triggram tagging decode with a pre-trained model I have a line in which each row ( For features, weights) tag features or triggram features, I need to create two dictionaries to use those values from my main program, will loop through main program features and in Victorby algorithms To use them in calculations see the weight. Runs the code below (I include print statement, etc.), but when it is finished, the IDE does not respond and I have to break it with Control C. There are 613 pages in the word in the file and the total 32 data is added. Why is the program not responding? Is there a more efficient way to do this? F_tag = open ('tag.model', 'r') tag_dic = {} trigram_dic = {} line in F_tag: lines = line.split () if lines 'Tag' [0]: tag_dic [lines [0]] = rows [1] Other: trigram_dic [line [0]] = line [1] return tag_dic, trigram_dic
To recover, unfortunately is the best one to use.
- I can confirm that there is more than 70,000 characters which the IDLE was not working and the terminal did (Mac OSX) . Open
- Open for your operating system
- Go to the appropriate folder (CD ...)
- Python (P) name forscript.py
No comments:
Post a Comment