Another small fix to component docs

This commit is contained in:
Matthew Honnibal 2017-11-23 11:47:20 +01:00 committed by GitHub
parent c9b63c0dfc
commit 6bc9917a0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -53,11 +53,11 @@ p
class MyComponent(object):
name = 'print_info'
def __init__(vocab, short_limit=10):
def __init__(self, vocab, short_limit=10):
self.vocab = vocab
self.short_limit = short_limit
def __call__(doc):
def __call__(self, doc):
if len(doc) < self.short_limit:
print("This is a pretty short document.")
return doc