def main(): consts = Constant.constant() smmry = Text.text(readfromfile(fname)) smmry.parseSentences() smmry.debugSentencesToFile() smmry.debugSentenceContextToFile() smmry.debugTextFreqToFile() #smmry.getSummary() smmry.getSMMRY()
def main(): consts = Constant.constant() smmry = Text.text(readfromfile(fname)) smmry.parseSentences() smmry.debugSentencesToFile() smmry.debugSentenceContextToFile() smmry.debugTextFreqToFile() #smmry.getSummary() smmry.getSMMRY()
# sompar = Text.paras[0] -> para object # sent = sompar.sentences[0] -> sentence object # sent.score, sent.text, sent.belongs -> para number from Sentences import Sentence from Constants import Constant import datetime from collections import OrderedDict import collections from nltk.stem.lancaster import LancasterStemmer from nltk.corpus import stopwords import numpy as np np.set_printoptions(threshold='nan') const = Constant.constant() ''' xxxxxxx Mr. Douglas Direct match xxxxxxxx Mrs. Douglas Direct match xxxxxxx Ms. Douglas Direct match xxxxxxxx Peter A. Douglas Capital before example.com is Spaces U.S.A Spaces xxxxxx. xxxxxx