Giter VIP home page Giter VIP logo

lstm-text-generation's Introduction

lstm-text-generation

文本生成(Word2Vec + RNN/LSTM)

目录:

  input : 输入文件数据
  1.char_LSTM.py  : 以字母为维度 预测下一个字母是什么
  2.word_LSTM.py  : 以单词为维度,预测下一个单词是是什么

char_LSTM.py

用RNN做文本生成,我们这里用温斯顿丘吉尔的任务传记作为我们的学习语料。 英文的小说语料可以从古登堡计划网站下载txt平文本:https://www.gutenberg.org/wiki/Category:Bookshelf) 这里我们采用keras简单的搭建深度学习模型进行学习。

word_LSTM.py

跟上一个模型一样,只不过使用的word2vec对语料构建词向量,预测下一个单词。

lstm-text-generation's People

Contributors

halxp1 avatar

Watchers

James Cloos avatar

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.