mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-24 17:06:29 +03:00
* Add clarifying comment
This commit is contained in:
parent
8c3ec4c140
commit
a6e2a44283
|
@ -97,6 +97,14 @@ def main():
|
|||
# sydney True
|
||||
# SYDNEY True
|
||||
#
|
||||
# The key thing to note here is that we're setting these attributes once,
|
||||
# over the vocabulary --- and then reusing them at run-time. This means the
|
||||
# amortized complexity of anything we do this way is going to be O(1). You
|
||||
# can match over expressions that need to have sets with tens of thousands
|
||||
# of values, e.g. "all the street names in Germany", and you'll still have
|
||||
# O(1) complexity. Most regular expression algorithms don't scale well to
|
||||
# this sort of problem.
|
||||
#
|
||||
# Now, let's use this in a pattern
|
||||
nlp.matcher.add("AuCitySportsTeam", "ORG", {},
|
||||
[
|
||||
|
|
Loading…
Reference in New Issue
Block a user