Spaces:
Runtime error
Runtime error
File size: 501 Bytes
d825710 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
from __future__ import absolute_import
from .tfidf import TFIDF
from .textrank import TextRank
try:
from .analyzer import ChineseAnalyzer
except ImportError:
pass
default_tfidf = TFIDF()
default_textrank = TextRank()
extract_tags = tfidf = default_tfidf.extract_tags
set_idf_path = default_tfidf.set_idf_path
textrank = default_textrank.extract_tags
def set_stop_words(stop_words_path):
default_tfidf.set_stop_words(stop_words_path)
default_textrank.set_stop_words(stop_words_path)
|