Example #1
0
def main():
    consts = Constant.constant()
    smmry = Text.text(readfromfile(fname))
    smmry.parseSentences()
    smmry.debugSentencesToFile()
    smmry.debugSentenceContextToFile()
    smmry.debugTextFreqToFile()
    #smmry.getSummary()
    smmry.getSMMRY()
Example #2
0
def main():
    consts = Constant.constant()
    smmry = Text.text(readfromfile(fname))
    smmry.parseSentences()
    smmry.debugSentencesToFile()
    smmry.debugSentenceContextToFile()
    smmry.debugTextFreqToFile()
    #smmry.getSummary()
    smmry.getSMMRY()
Example #3
0
from Constants import Constant
from VisionMath import Math
from Camera import Camera

c = Constant()
vision_math = Math()
camera = Camera("Microsoft", c.M_HA, c.M_VA, c.M_DFOV)

print "HFOV: ", camera.hfov
print "VFOV: ", camera.vfov

print "Midpoint: "
vision_math.find_tx_ty_math(160, 90, camera.hfov, camera.vfov)
print ""
print "Top-left point: "
vision_math.find_tx_ty_math(0, 0, camera.hfov, camera.vfov)
print ""
print "Bottom-right point: "
vision_math.find_tx_ty_math(320, 180, camera.hfov, camera.vfov)
print ""
print "Bottom-left point: "
vision_math.find_tx_ty_math(0, 180, camera.hfov, camera.vfov)
print ""
print "Top-right point: "
vision_math.find_tx_ty_math(320, 0, camera.hfov, camera.vfov)
print ""
print "Middle-left: "
vision_math.find_tx_ty_math(80, 90, camera.hfov, camera.vfov)
print ""
print "Middle-top: "
vision_math.find_tx_ty_math(160, 45, camera.hfov, camera.vfov)
Example #4
0
# 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