-
Notifications
You must be signed in to change notification settings - Fork 0
Mital188/Bigram-Probability
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
---------------------- Programming Language and Compiler ---------------------- -Python3.0 -Pycharm3 edu ---------------------- To compile the code ---------------------- a) Copy pate the NLP.py python file and text.txt text file in the window b) Run the program as sentence is included in the program In command line NLP.py - Just the file name is sufficient, the code reads from the corpus directly - Corpus name (text.txt), to be kept in the same folder as the source code ---------------------- OutPut ---------------------- a) Bigram Count of Corpus b) Bigram Count for Sentence-1 c) Bigram Count for Sentence-2 d) Bigram Probabilities for Sentence-2 e) Bigram Probabilities for Sentence-1 f) Total Probability for Sentence-1 g) Total Probability for Sentence-2 ---------------------- Matrix format ---------------------- - Unique Count of sentences is taken into account - Sentences fed to the code manually - Unable to print the labels but the matrix format was to be as follows the chief executive officer said last year revenue was good. the 0 0 0 0 0 0 0 0 0 0 chief 0 0 0 0 0 0 0 0 0 0 executive 0 0 0 0 0 0 0 0 0 0 officer 0 0 0 0 0 0 0 0 0 0 said 0 0 0 0 0 0 0 0 0 0 last 0 0 0 0 0 0 0 0 0 0 year 0 0 0 0 0 0 0 0 0 0 revenue 0 0 0 0 0 0 0 0 0 0 was 0 0 0 0 0 0 0 0 0 0 good. 0 0 0 0 0 0 0 0 0 0
About
Calculates the probability of a sentence occurring in corpus using bi-grams and Laplace smoothing
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published