Skip to content

Commit e83c818

Browse files
werewhonnibal
andauthored
DependencyMatcher improvements (fix explosion#6678) (explosion#6744)
* Adding contributor agreement for user werew * [DependencyMatcher] Comment and clean code * [DependencyMatcher] Use defaultdicts * [DependencyMatcher] Simplify _retrieve_tree method * [DependencyMatcher] Remove prepended underscores * [DependencyMatcher] Address TODO and move grouping of token's positions out of the loop * [DependencyMatcher] Remove _nodes attribute * [DependencyMatcher] Use enumerate in _retrieve_tree method * [DependencyMatcher] Clean unused vars and use camel_case naming * [DependencyMatcher] Memoize node+operator map * Add root property to Token * [DependencyMatcher] Groups matches by root * [DependencyMatcher] Remove unused _keys_to_token attribute * [DependencyMatcher] Use a list to map tokens to matcher's keys * [DependencyMatcher] Remove recursion * [DependencyMatcher] Use a generator to retrieve matches * [DependencyMatcher] Remove unused memory pool * [DependencyMatcher] Hide private methods and attributes * [DependencyMatcher] Improvements to the matches validation * Apply suggestions from code review Co-authored-by: Matthew Honnibal <honnibal+gh@gmail.com> * [DependencyMatcher] Fix keys_to_position_maps * Remove Token.root property * [DependencyMatcher] Remove functools' lru_cache Co-authored-by: Matthew Honnibal <honnibal+gh@gmail.com>
1 parent d023613 commit e83c818

File tree

3 files changed

+308
-174
lines changed

3 files changed

+308
-174
lines changed

.github/contributors/werew.md

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
# spaCy contributor agreement
2+
3+
This spaCy Contributor Agreement (**"SCA"**) is based on the
4+
[Oracle Contributor Agreement](http://www.oracle.com/technetwork/oca-405177.pdf).
5+
The SCA applies to any contribution that you make to any product or project
6+
managed by us (the **"project"**), and sets out the intellectual property rights
7+
you grant to us in the contributed materials. The term **"us"** shall mean
8+
[ExplosionAI GmbH](https://explosion.ai/legal). The term
9+
**"you"** shall mean the person or entity identified below.
10+
11+
If you agree to be bound by these terms, fill in the information requested
12+
below and include the filled-in version with your first pull request, under the
13+
folder [`.github/contributors/`](/.github/contributors/). The name of the file
14+
should be your GitHub username, with the extension `.md`. For example, the user
15+
example_user would create the file `.github/contributors/example_user.md`.
16+
17+
Read this agreement carefully before signing. These terms and conditions
18+
constitute a binding legal agreement.
19+
20+
## Contributor Agreement
21+
22+
1. The term "contribution" or "contributed materials" means any source code,
23+
object code, patch, tool, sample, graphic, specification, manual,
24+
documentation, or any other material posted or submitted by you to the project.
25+
26+
2. With respect to any worldwide copyrights, or copyright applications and
27+
registrations, in your contribution:
28+
29+
* you hereby assign to us joint ownership, and to the extent that such
30+
assignment is or becomes invalid, ineffective or unenforceable, you hereby
31+
grant to us a perpetual, irrevocable, non-exclusive, worldwide, no-charge,
32+
royalty-free, unrestricted license to exercise all rights under those
33+
copyrights. This includes, at our option, the right to sublicense these same
34+
rights to third parties through multiple levels of sublicensees or other
35+
licensing arrangements;
36+
37+
* you agree that each of us can do all things in relation to your
38+
contribution as if each of us were the sole owners, and if one of us makes
39+
a derivative work of your contribution, the one who makes the derivative
40+
work (or has it made will be the sole owner of that derivative work;
41+
42+
* you agree that you will not assert any moral rights in your contribution
43+
against us, our licensees or transferees;
44+
45+
* you agree that we may register a copyright in your contribution and
46+
exercise all ownership rights associated with it; and
47+
48+
* you agree that neither of us has any duty to consult with, obtain the
49+
consent of, pay or render an accounting to the other for any use or
50+
distribution of your contribution.
51+
52+
3. With respect to any patents you own, or that you can license without payment
53+
to any third party, you hereby grant to us a perpetual, irrevocable,
54+
non-exclusive, worldwide, no-charge, royalty-free license to:
55+
56+
* make, have made, use, sell, offer to sell, import, and otherwise transfer
57+
your contribution in whole or in part, alone or in combination with or
58+
included in any product, work or materials arising out of the project to
59+
which your contribution was submitted, and
60+
61+
* at our option, to sublicense these same rights to third parties through
62+
multiple levels of sublicensees or other licensing arrangements.
63+
64+
4. Except as set out above, you keep all right, title, and interest in your
65+
contribution. The rights that you grant to us under these terms are effective
66+
on the date you first submitted a contribution to us, even if your submission
67+
took place before the date you sign these terms.
68+
69+
5. You covenant, represent, warrant and agree that:
70+
71+
* Each contribution that you submit is and shall be an original work of
72+
authorship and you can legally grant the rights set out in this SCA;
73+
74+
* to the best of your knowledge, each contribution will not violate any
75+
third party's copyrights, trademarks, patents, or other intellectual
76+
property rights; and
77+
78+
* each contribution shall be in compliance with U.S. export control laws and
79+
other applicable export and import laws. You agree to notify us if you
80+
become aware of any circumstance which would make any of the foregoing
81+
representations inaccurate in any respect. We may publicly disclose your
82+
participation in the project, including the fact that you have signed the SCA.
83+
84+
6. This SCA is governed by the laws of the State of California and applicable
85+
U.S. Federal law. Any choice of law rules will not apply.
86+
87+
7. Please place an “x” on one of the applicable statement below. Please do NOT
88+
mark both statements:
89+
90+
* [x] I am signing on behalf of myself as an individual and no other person
91+
or entity, including my employer, has or will have rights with respect to my
92+
contributions.
93+
94+
* [ ] I am signing on behalf of my employer or a legal entity and I have the
95+
actual authority to contractually bind that entity.
96+
97+
## Contributor Details
98+
99+
| Field | Entry |
100+
|------------------------------- | -------------------- |
101+
| Name | Luigi Coniglio |
102+
| Company name (if applicable) | |
103+
| Title or role (if applicable) | |
104+
| Date | 10/01/2021 |
105+
| GitHub username | werew |
106+
| Website (optional) | |

0 commit comments

Comments
 (0)