src.preprocessing.cluster_explainer
Generate a summary of the clusters.
Classes
ClusterExplainer ([threshold])
|
Generate a summary and extracts the entities from the cluster. |
-
class src.preprocessing.cluster_explainer.ClusterExplainer(threshold=10)[source]
Generate a summary and extracts the entities from the cluster.
- Parameters:
threshold (int
) – the number of important sentences in the cluster.
-
threshold:
int
= 10
-
rank_sentences(sentences)[source]
Rank the sentences based on the LexRank model.
- Parameters:
sentences (Iterable
[str
]) – the filtered sentences in a cluster.
- Return type:
list
[str
]
- Returns:
the most important sentences in the cluster.
-
custom_transform(data, **transform_args)[source]
Generate a summary and extract the entities from the cluster.
- Parameters:
-
- Return type:
DataFrame
- Returns:
the transformed data.