Metadata-Version: 2.1
Name: cluster-pub
Version: 0.1.0
Summary: 
Author: felipe barcelos
Author-email: felipebarcelos@ufu.br
Requires-Python: >=3.11,<3.12
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Requires-Dist: bibtexparser (>=1.4.1,<1.5.0)
Requires-Dist: matplotlib (>=3.9.2,<3.10.0)
Requires-Dist: nbib (>=0.3.2,<0.4.0)
Requires-Dist: rispy (>=0.9.0,<0.10.0)
Requires-Dist: scikit-learn (>=1.5.2,<1.6.0)
Requires-Dist: scipy (>=1.14.1,<1.15.0)
Requires-Dist: typer (>=0.12.5,<0.13.0)
Description-Content-Type: text/markdown

# ClusterPub

ClusterPub is a tool developed to help researchers in their processes of bibliographic review, 
helping them to find papers related to their areas of interest,
based on search results returned by papers repositories, like, IEEE Xplore and Pubmed.

## Instalation 🛠

To install and execute ClusterPub it is necessary to execute the following commands:

### Programming Language 💻

ClusterPub was developed using Python 3.11, to install it execute the commands bellow:

#### First update linux packages

```bash Python installation command
sudo apt update
```

#### Add Python packages repository
```bash Python installation command
sudo add-apt-repository ppa:deadsnakes/ppa
```

#### Install Python 3.11
```bash Python installation command
sudo apt install python3.11
```


### Poetry Package Manager 📦

#### Install pipx
```bash Python installation command
python3 -m pip install --user pipx
python3 -m pipx ensurepath
```

#### Install Poetry
```bash Python installation command
pipx install poetry
```


### Install dependencies 📦

OBS: Run the following commands inside the project directory.

#### Define Python env version
```bash Python installation command
poetry env use 3.11
```

#### Create Python virtual environment
```bash Python installation command
poetry shell
```

#### Install dependencies
```bash Python installation command
poetry install
```

## Run ClusterPub 🚀

To execute ClusterPub run the following command:

#### Cluster publications present in a bibliographic file
```bash Python installation command
cluster-pub {source_file} {result_file}
```

#### OBS: The result_file name should contain the desired extension.

The allowed extensions for the source file are:

- NBIB
- RIS
- BibTex

The allowed extensions for the result file are:

- EPS
- JPEG
- PDF
- PGF
- PNG
- PS
- Raw (Binary)
- RGBA
- SVG
- SVGZ
- TIF
- TIFF
- Webp


#### To obtain help about the parameters and options available execute the following command:
```bash Python installation command
cluster-pub --help
```

There is a folder in the project directory called sample_files, containing files that could be used to execute tests.

## Extract Clustering Metrics  📈

To calculate clustering metrics, like, Silhouette Score, Davies-Bouldin Score and Calinski-Harabasz Score run the following commands:

OBS: The argument number_of_clusters is not the desired clusters quantity,
but it is the quantity of clusters/categories that might exit in the analysed dataset.

#### Calculate Davies-Bouldin Score
```bash Python installation command
cluster-pub-metrics davies_bouldin_score {source_file} {number_of_clusters}
```

#### Calculate Calinski-Harabasz Score
```bash Python installation command
cluster-pub-metrics calinski_harabasz_score {source_file} {number_of_clusters}
```

#### Calculate Silhouette Score
```bash Python installation command
cluster-pub-metrics silhouette_score {source_file} {number_of_clusters} --distance-metric={distance_metric}
```

#### To obtain help for the score commands listed above run the following command:
```bash Python installation command
cluster-pub-metrics {score_command} -- help
```

## Background Information 🔍

The default hyperparameters and algorithms used in this project are:

- Word Embeddings Technicque: Hash2Vec
- Dimensionality Reduction Technicque: SVD
- Number of singular values used in SVD: 5
- Clustering Algorithm: Hierarchical Clustering
- Distance Metric: Cosine Similarity
- Linkage Method: Weighted
