https://github.com/raminBadri/Textmining-python
A text/document mining with python
https://github.com/raminBadri/Textmining-python
data-science k-means-clustering pycharm python3 text-mining
Last synced: 5 months ago
JSON representation
A text/document mining with python
- Host: GitHub
- URL: https://github.com/raminBadri/Textmining-python
- Owner: raminBadri
- License: mit
- Created: 2020-06-30T20:36:18.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2025-12-23T12:16:14.000Z (7 months ago)
- Last Synced: 2026-01-30T08:32:43.591Z (5 months ago)
- Topics: data-science, k-means-clustering, pycharm, python3, text-mining
- Language: Python
- Homepage:
- Size: 3.85 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Text Mining and Customer Clustering with TripAdvisor Reviews
[](https://www.python.org)
[](https://pandas.pydata.org)
[](https://scikit-learn.org)
[](https://matplotlib.org)
[](LICENSE)
This is one of my master's projects, focusing on the practice of **text mining** using a dataset inspired by the **TripAdvisor** website. The primary aim is to **cluster customers** based on their **comments** and reviews left on the platform. The project was implemented using **Python 3** and the **PyCharm IDE**.
Due to data sharing restrictions, the original dataset cannot be included, but all steps, data features, and methodologies are thoroughly documented in the provided report file.
## π About the Dataset
The dataset is inspired by **TripAdvisor**, a well-known travel agency company. It includes **1,850 textual data entries** (documents), each containing reviews and ratings from previous travelers regarding various hotels. To optimize performance and reduce computational load, only the **first 100 documents** were randomly selected as the input data. This subset maintains the essence of the original dataset without following any specific order.
- **Data Type**: Textual reviews and ratings.
- **Source**: TripAdvisor (anonymized and inspired).
- **Size**: 100 documents (subset from 1,850).
- **Purpose**: Clustering based on customer feedback.
## πΊοΈ Project Sections
The project is structured into the following sections, as detailed in the report:
1. **Section 1: General Objectives of the Chapter**
Outlines the overall goals and scope of the text mining project.
2. **Section 2: Dataset Characteristics**
Describes the dataset's features, structure, and key attributes.
3. **Section 3: Programming Language and IDE Description**
Details the use of Python 3 and PyCharm IDE for implementation.
4. **Section 4: Data Cleansing and Clustering Phase**
Covers data preprocessing, cleansing techniques, and the application of clustering algorithms.
5. **Section 5: Presentation and Analysis of Results**
Presents the clustering outcomes, visualizations, and analytical insights.
## π οΈ Technologies and Packages
The project leverages the following Python packages for data manipulation, analysis, and visualization:
- **Pandas**: For data handling and manipulation.
- **NumPy**: For numerical computations.
- **Scikit-learn (sklearn)**: For machine learning algorithms, including clustering.
- **Matplotlib**: For plotting and visualizations.
- **SciPy**: For scientific computing, supporting advanced mathematical functions.
## π Clustering Methods
Two primary clustering techniques were employed to group customers based on their textual comments:
- **K-Means Clustering**: A centroid-based algorithm that partitions data into k clusters by minimizing variance within each cluster.
- **Dendrogram (Hierarchical Clustering)**: Used for visualizing the hierarchical structure of clusters, often via linkage methods to show relationships between data points.
## π Repository Structure
- `report/`: Detailed project report and documentation.
- `src/`: Source code files for data processing and clustering.
- `README.md`: This file.
## π Getting Started
1. Ensure you have **Python 3.8+** installed. Download from [python.org](https://www.python.org).
2. Install the required packages:
```bash
pip install pandas numpy scikit-learn matplotlib scipy
```
3. Clone this repository:
```bash
git clone https://github.com/raminBadri/Text-Mining-TripAdvisor.git
```
4. Open the project in **PyCharm IDE** or run the scripts/notebooks to explore the text mining and clustering processes.
> **Note**: The dataset is not provided; refer to the report for data characteristics and use a similar textual dataset for experimentation.
## π€ Contributing
Contributions are welcome! Feel free to fork this repository, suggest improvements, or add new analyses. Please submit pull requests with detailed descriptions.
## π License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
---
*If this project inspires your research or studies, please give it a β and share your feedback!* π
For more details, check the full report in the `reports/` directory. If you have questions, open an issue in this repository.