Hi! I'm Susanta! ๐
- ๐ญ Working on hyper-scale distributed systems.
- ๐ญ Experienced in solving practical computer vision and NLP problems.
- ๐ฑ Iโm currently learning more about distributed systems.
Next Word Prediction using n-gram Probabilistic Model with various Smoothing Techniques
Home Page: https://susantabiswas.github.io/Word-Prediction-Ngram/
License: MIT License
Hi,
There is no corpusfile.txt so i tried to test my txt file. First i get encoding error and i fixed it by adding encoding='utf-8' into loadCorpus.
Now i get another error. Its list index out of range. How can i fix it?
IndexError Traceback (most recent call last)
<ipython-input-17-c7bc734e5e35> in <module>()
1 if __name__ == '__main__':
----> 2 main()
<ipython-input-16-abe7438bdb9e> in main()
12 train_file = 'corpusfile.txt'
13 #load the corpus for the dataset
---> 14 token_len = loadCorpus(train_file, bi_dict, tri_dict, quad_dict, vocab_dict)
15
16 #estimate the lambdas for interpolation
<ipython-input-3-47bb9304cafa> in loadCorpus(file_path, bi_dict, tri_dict, quad_dict, vocab_dict)
97
98 #store the last few words for the next sentence pairing
---> 99 w1 = token[n -3]
100 w2 = token[n -2]
101 w3 = token[n -1]
IndexError: list index out of range
Hey Susanta,
Do you have any theory references for the implementation, as I am not able to understand the notations used and also the purpose of some functions for eg: findBestFitIntercept, findBestFitSlope.
Thank you
Can you help me find the corpus file?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.