GithubHelp home page GithubHelp logo

bburns / languagemodels Goto Github PK

View Code? Open in Web Editor NEW
48.0 48.0 3.0 3.8 MB

Comparison of n-gram vs RNN (recurrent neural network) language models (predicting next word in a sequence), using Python, NLTK, Keras, and TensorFlow

Makefile 5.35% Python 94.65%

languagemodels's Introduction

languagemodels's People

Contributors

bburns 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

languagemodels's Issues

Question regarding preprocessing

Great project! It has been very helpful so far. However, I don't fully understand how you're presenting the input to the network. Your report states that all text is put in a single string and then "split into paragraphs". So how exactly does an input batch look like? Does each row of an input batch contain one sentence? Or can a row contain the last half of one sentence and the beginning of the next? How long are the "paragraphs"?

And one question regarding your output: if I see it correctly, you feed the network with an input batch of a some size (batch_size, sequence_length) which is mapped to a 3D tensor with (batch_size, sequence_length, embedding_size) and given to the RNN.
The output of the RNN is a vector (batch_size, 1) containing the index of the most likely next word. Is that correct?

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.