Code Monkey home page Code Monkey logo

text-generation's Introduction

Text-Generation

An attention-based deep neural language model using bidrectional LSTMs to generate text sequences character-by-character, given a context sequence of text.

Utilized few English novels for training and evaluating the model.

Utilized PyTorch framework for development. Used a NVIDIA GeForce GTX 1080 Ti GPU machine to facilitate training of the model.

The model achieves an average validation perplexity of approximately 93.

The trained model is available as "model_generate.pt".

Text generation examples

From training novels:

1. Pride and Prejudice - Jane Austen:

...Context : The tumult of her mind, was now painfully great. She knew not how to support herself, and from actual weakness sat down andcried for half-an-hour.

...Generated: As I found that I think my cold--ship of any command, obstructive, and in the closely. What was all good scarcely distress,when you can the rise and then immen that she seek sound him that you are more night be. Jane so friend! There was of the steps of a tran by the sea all the room for her. When

2. Dracula - Bram Stoker:

...Context : To believe in things that you cannot. Let me illustrate. I heard once of an American who so defined faith: 'that faculty which enables us to believe things which we know to be untrue.' For one, I follow that man.

...Generated: Go not things, he might I be things to any man where any dark to call a harders is from the matter carriage, not only starm sunset from the day.

"I don't want of entire more so receiving the spirit in the room was a great us and such a mist we should go it, and the window glanced from you get to re

From non-training novels (but same author or same genre):

1. Emma - Jane Austen:

...Context : During his present short stay, Emma had barely seen him; but just enough to feel that the first meeting was over, and to give her the impression of his not being improved by the mixture of pique and pretension, now spread over his air.

...Generated: fish, for I can don, that the sat up in the passions at all, for my soon with exoloce, for my mark who had not to be that he had long considerable the smalled by the sobubs; when the degree was, authorded you at land with the more gloped on

2. The Strange Case of Dr. Jekyll and Mr. Hyde - Robert Louis Stevenson:

...Context : Poole swung the axe over his shoulder; the blow shook the building, and the red baize door leaped against the lock and hinges. A dismal screech, as of mere animal terror, rang from the cabinet.

...Generated: But all the rest on the London. When the shapeded, that strength of the bell of the druck. "Court, also insported me, "that they would find there well, and then that time lad hepromided that my back, the ground, who sun I would never us. It is a secrets from this straight that both suspicion to t

text-generation's People

Contributors

apurbasengupta avatar yashv28 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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