summary.py
简单的基于多语言Python和NLTK的文本摘要实现。
安装
$ pip install pysummarize
设置
使用之前,请确保已下载stopwords和punkt NLTK软件包:
import nltk
nltk . download ([ 'stopwords' , 'punkt' ])
快速开始
from summarize import summarize
summarize ( "Alice and Bob are friends. Alice is fun and cuddly."
" Bob is cute and quirky. Together they go on wonderful"
" adventures in the land of tomorrow. Alice's cuddline
2022-05-07 00:38:14
7KB
Python
1