{"id":19044237,"url":"https://github.com/selcia25/text-generation-using-lstm","last_synced_at":"2026-05-17T19:04:01.360Z","repository":{"id":228619366,"uuid":"774491905","full_name":"selcia25/text-generation-using-lstm","owner":"selcia25","description":"💬This project is a research work on text generation using LSTM (Long Short-Term Memory) neural networks.","archived":false,"fork":false,"pushed_at":"2024-03-22T11:37:16.000Z","size":649,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-21T23:18:07.270Z","etag":null,"topics":["lstm-neural-networks","tensorflow","text-to-speech","textgeneration"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/selcia25.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-19T16:35:36.000Z","updated_at":"2024-05-26T20:18:23.000Z","dependencies_parsed_at":"2025-01-02T16:17:45.449Z","dependency_job_id":null,"html_url":"https://github.com/selcia25/text-generation-using-lstm","commit_stats":null,"previous_names":["selcia25/text-generation-using-lstm"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/selcia25/text-generation-using-lstm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/selcia25%2Ftext-generation-using-lstm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/selcia25%2Ftext-generation-using-lstm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/selcia25%2Ftext-generation-using-lstm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/selcia25%2Ftext-generation-using-lstm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/selcia25","download_url":"https://codeload.github.com/selcia25/text-generation-using-lstm/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/selcia25%2Ftext-generation-using-lstm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33151625,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T09:28:26.183Z","status":"ssl_error","status_checked_at":"2026-05-17T09:27:52.702Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["lstm-neural-networks","tensorflow","text-to-speech","textgeneration"],"created_at":"2024-11-08T22:45:16.452Z","updated_at":"2026-05-17T19:04:01.324Z","avatar_url":"https://github.com/selcia25.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Text Generation using LSTM\n\nThis project explores text generation using LSTM (Long Short-Term Memory) neural networks. It trains an LSTM model on a dataset of Medium article titles to predict the next word in a sequence, allowing for the generation of new text based on a seed text.\n\n## Installation\n\n1. Clone the repository:\n   ```sh\n   git clone https://github.com/selcia25/text-generation-using-lstm.git\n   ```\n\n2. Install the required libraries:\n   ```sh\n   pip install pandas numpy tensorflow matplotlib\n   ```\n\n## Dataset\n\nThe dataset used for training the model is a collection of Medium article titles. The dataset (`medium_data.csv`) contains a multiple columns including `title` with the titles of the articles.\n\n## Model Training\n\n1. Preprocess the data: Clean the text by removing unnecessary characters and tokenize the text using the `Tokenizer` class from Keras.\n\n2. Generate input sequences: Create input sequences of varying lengths to train the model.\n\n3. Pad sequences: Pad the input sequences to ensure uniform length.\n\n4. Build the LSTM model: Construct a Sequential model with an Embedding layer, a Bidirectional LSTM layer, and a Dense output layer with a softmax activation.\n\n5. Compile the model: Compile the model using the Adam optimizer and categorical crossentropy loss function.\n\n6. Train the model: Train the model on the input sequences and corresponding labels.\n\n## Usage\n\n1. Run the script to train the model.\n\n2. Use the trained model to generate text by providing a seed text and specifying the number of words to generate.\n\n## Examples\n\nHere are some examples of generating text using the trained model:\n\n- Seed text: \"implementation of\"\n  - Generated text: \"implementation of rnn lstm\"\n\n## Contributing\n\nContributions are welcome! Please fork the repository and create a pull request with your changes.\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fselcia25%2Ftext-generation-using-lstm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fselcia25%2Ftext-generation-using-lstm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fselcia25%2Ftext-generation-using-lstm/lists"}