Giter Site home page Giter Site logo

susantabiswas / word-prediction-ngram Goto Github PK

View Code? Open in Web Editor NEW
34.0 4.0 11.0 51 KB

Next Word Prediction using n-gram Probabilistic Model with various Smoothing Techniques

Home Page: https://susantabiswas.github.io/Word-Prediction-Ngram/

License: MIT License

Jupyter Notebook 100.00%
ngrams nlp trigrams quadgrams bigrams unigram language-model prediction-ngram ngram-probabilistic-model prediction

word-prediction-ngram's Introduction

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.

word-prediction-ngram's People

Contributors

susantabiswas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

word-prediction-ngram's Issues

list index out of range

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

resource references

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.