From be5a6365c6e82c55f47235172bae1929294f29a6 Mon Sep 17 00:00:00 2001 From: Yener Date: Mon, 30 Dec 2019 09:30:48 +0800 Subject: [PATCH] Update textrank.py --- jiagu/textrank.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/jiagu/textrank.py b/jiagu/textrank.py index 80f8f66..17b7fa8 100644 --- a/jiagu/textrank.py +++ b/jiagu/textrank.py @@ -1,6 +1,5 @@ # -*- encoding:utf-8 -*- import sys -import numpy as np from jiagu import utils from heapq import nlargest from collections import defaultdict @@ -26,7 +25,6 @@ class Keywords(object): with open(self.__stop_words_file, 'r', encoding='utf-8') as f: for word in f: self.__stop_words.add(word.strip()) - np.seterr(all='warn') @staticmethod def build_vocab(sents): @@ -94,7 +92,6 @@ class Summarize(object): if use_stopword: for word in open(self.__stop_words_file, 'r', encoding='utf-8'): self.__stop_words.add(word.strip()) - np.seterr(all='warn') def filter_dictword(self, sents): _sents = []