reshape data as suggested by sklearn
This commit is contained in:
2
setup.py
2
setup.py
@@ -29,7 +29,7 @@ class InstallCommand(install):
|
|||||||
|
|
||||||
|
|
||||||
setup(name='talon',
|
setup(name='talon',
|
||||||
version='1.4.2',
|
version='1.4.3',
|
||||||
description=("Mailgun library "
|
description=("Mailgun library "
|
||||||
"to extract message quotations and signatures."),
|
"to extract message quotations and signatures."),
|
||||||
long_description=open("README.rst").read(),
|
long_description=open("README.rst").read(),
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ RE_REVERSE_SIGNATURE = re.compile(r'''
|
|||||||
|
|
||||||
def is_signature_line(line, sender, classifier):
|
def is_signature_line(line, sender, classifier):
|
||||||
'''Checks if the line belongs to signature. Returns True or False.'''
|
'''Checks if the line belongs to signature. Returns True or False.'''
|
||||||
data = numpy.array(build_pattern(line, features(sender)))
|
data = numpy.array(build_pattern(line, features(sender))).reshape(1, -1)
|
||||||
return classifier.predict(data) > 0
|
return classifier.predict(data) > 0
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user