{"id":41347065,"url":"https://github.com/markiskorova/machine-learning-nlp-predict-author","last_synced_at":"2026-01-23T07:04:49.823Z","repository":{"id":247849035,"uuid":"827015295","full_name":"markiskorova/Machine-Learning-NLP-Predict-Author","owner":"markiskorova","description":"Machine Learning \u0026 Natural Language Processing: Predict the author of literary text snippets. Built with TensorFlow and Keras, this project trains an LSTM model on classic literature to identify writing style and authorship.","archived":false,"fork":false,"pushed_at":"2025-05-25T03:25:06.000Z","size":3663,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-25T04:59:57.712Z","etag":null,"topics":["keras","machine-learning","natural-language-processing","python","tensorflow","text-tokenization","text-vectorization"],"latest_commit_sha":null,"homepage":"","language":"Python","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/markiskorova.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-07-10T21:06:10.000Z","updated_at":"2025-05-25T03:28:59.000Z","dependencies_parsed_at":"2025-02-14T02:42:01.495Z","dependency_job_id":"1248d1cb-a13a-4829-b640-383a7a83e5d9","html_url":"https://github.com/markiskorova/Machine-Learning-NLP-Predict-Author","commit_stats":null,"previous_names":["markiskorova/tensorflow-predict-author","markiskorova/machine-learning-nlp-predict-author"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/markiskorova/Machine-Learning-NLP-Predict-Author","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markiskorova%2FMachine-Learning-NLP-Predict-Author","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markiskorova%2FMachine-Learning-NLP-Predict-Author/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markiskorova%2FMachine-Learning-NLP-Predict-Author/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markiskorova%2FMachine-Learning-NLP-Predict-Author/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/markiskorova","download_url":"https://codeload.github.com/markiskorova/Machine-Learning-NLP-Predict-Author/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markiskorova%2FMachine-Learning-NLP-Predict-Author/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28682280,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T05:48:07.525Z","status":"ssl_error","status_checked_at":"2026-01-23T05:48:07.129Z","response_time":59,"last_error":"SSL_read: 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":["keras","machine-learning","natural-language-processing","python","tensorflow","text-tokenization","text-vectorization"],"created_at":"2026-01-23T07:03:12.030Z","updated_at":"2026-01-23T07:04:49.815Z","avatar_url":"https://github.com/markiskorova.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# 🧠 Machine Learning \u0026 NLP: Predicting Authors from Classic Literature\n\nThis project employs machine learning and natural language processing (NLP) to analyze classic literary works and predict the author of a given phrase. By examining textual patterns and stylistic nuances, the model learns to attribute authorship with notable accuracy.\n\n## 📚 Overview\n\n- **Objective**: Develop a model that can predict the author of a text snippet from classic literature.\n- **Techniques Used**:\n  - Text vectorization and tokenization\n  - Sequential modeling with LSTM (Long Short-Term Memory) networks\n- **Tools \u0026 Libraries**:\n  - Python\n  - TensorFlow \u0026 Keras\n  - Pandas \u0026 NumPy\n\n## 📁 Repository Structure\n\n- `Text_Author.csv`: Dataset containing text excerpts and corresponding author labels.\n- `text-analysis-detect-author-seq-lstm.py`: Python script for data preprocessing, model training, and evaluation.\n- `README.md`: Project documentation.\n- `LICENSE`: MIT License.\n\n## 🚀 Getting Started\n\n### Prerequisites\n\nEnsure you have the following installed:\n\n- Python 3.x\n- pip (Python package installer)\n\n### Installation\n\n1. **Clone the repository**:\n\n   ```bash\n   git clone https://github.com/markiskorova/Machine-Learning-NLP-Predict-Author.git\n   cd Machine-Learning-NLP-Predict-Author\n   ```\n\n2. **Create and activate a virtual environment**:\n\n   ```bash\n   python -m venv venv\n   source venv/bin/activate  # On Windows use `venv\\Scripts\\activate`\n   ```\n\n3. **Install required packages**:\n\n   ```bash\n   pip install tensorflow pandas numpy\n   ```\n\n### Running the Model\n\nExecute the script to train and evaluate the model:\n\n```bash\npython text-analysis-detect-author-seq-lstm.py\n```\n\n*The script will process the data, train the LSTM model, and output evaluation metrics.*\n\n## 📊 Dataset Details\n\n- **Source**: Curated collection of classic literary texts.\n- **Format**: CSV file with two columns:\n  - `text`: Excerpt from a literary work.\n  - `author`: Name of the author.\n\n## 🔍 Model Architecture\n\n- **Embedding Layer**: Converts words into vector representations.\n- **LSTM Layer**: Captures sequential dependencies in the text.\n- **Dense Output Layer**: Outputs probabilities for each author class.\n\n## 📈 Evaluation Metrics\n\n- **Accuracy**: Measures the proportion of correct predictions.\n- **Loss**: Evaluates the model's prediction error.\n\n## 🛠️ Future Enhancements\n\n- Incorporate more diverse literary works to improve model generalization.\n- Experiment with advanced architectures like Bidirectional LSTMs or Transformers.\n- Implement a user interface for interactive author prediction.\n\n## 📄 License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n\n## 🤝 Contributing\n\nContributions are welcome! Please fork the repository and submit a pull request for any enhancements or bug fixes.\n\n## 📬 Contact\n\nFor questions or suggestions, feel free to open an issue or contact the repository maintainer.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkiskorova%2Fmachine-learning-nlp-predict-author","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarkiskorova%2Fmachine-learning-nlp-predict-author","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkiskorova%2Fmachine-learning-nlp-predict-author/lists"}