mirror of
https://github.com/searxng/searxng
synced 2024-01-01 19:24:07 +01:00
c
This commit is contained in:
parent
21bf06581c
commit
2e31346307
4 changed files with 4 additions and 4 deletions
|
@ -22,4 +22,4 @@ wlc==1.13
|
||||||
coloredlogs==15.0.1
|
coloredlogs==15.0.1
|
||||||
requests
|
requests
|
||||||
markdown
|
markdown
|
||||||
textrank4zh
|
git+https://github.com/luxtiasco/TextRank4ZH.git
|
|
@ -18,4 +18,4 @@ typing_extensions==4.5.0
|
||||||
fasttext-predict==0.9.2.1
|
fasttext-predict==0.9.2.1
|
||||||
requests
|
requests
|
||||||
markdown
|
markdown
|
||||||
textrank4zh
|
git+https://github.com/luxtiasco/TextRank4ZH.git
|
|
@ -654,7 +654,7 @@ def health():
|
||||||
@app.route('/textrank', methods=['POST'])
|
@app.route('/textrank', methods=['POST'])
|
||||||
def textrank():
|
def textrank():
|
||||||
res = []
|
res = []
|
||||||
text = request.form.get('text')
|
text = request.json['text']
|
||||||
tr4s = TextRank4Sentence()
|
tr4s = TextRank4Sentence()
|
||||||
tr4s.analyze(text=text, lower=True, source = 'all_filters')
|
tr4s.analyze(text=text, lower=True, source = 'all_filters')
|
||||||
for item in tr4s.get_key_sentences(num=15):
|
for item in tr4s.get_key_sentences(num=15):
|
||||||
|
|
|
@ -654,7 +654,7 @@ def health():
|
||||||
@app.route('/textrank', methods=['POST'])
|
@app.route('/textrank', methods=['POST'])
|
||||||
def textrank():
|
def textrank():
|
||||||
res = []
|
res = []
|
||||||
text = request.form.get('text')
|
text = request.json['text']
|
||||||
tr4s = TextRank4Sentence()
|
tr4s = TextRank4Sentence()
|
||||||
tr4s.analyze(text=text, lower=True, source = 'all_filters')
|
tr4s.analyze(text=text, lower=True, source = 'all_filters')
|
||||||
for item in tr4s.get_key_sentences(num=15):
|
for item in tr4s.get_key_sentences(num=15):
|
||||||
|
|
Loading…
Add table
Reference in a new issue