Lj Miranda
26d5d637e3
Add suggester documentation in Exclusive_SpanCategorizer
2023-01-17 10:34:21 +08:00
Lj Miranda
e61f0a4035
Update how spancat_exclusive is constructed
...
In this commit, I added the following:
- Put the default values of negative_weight and allow_overlap
in the default_config dictionary.
- Rename make_spancat -> make_exclusive_spancat
2023-01-17 10:17:29 +08:00
Lj Miranda
65ce4347ef
Apply suggestions from code review
...
Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>
2023-01-17 09:38:47 +08:00
Lj Miranda
8c4eee28bc
Better approach for handling zero suggestions
2022-12-21 20:01:02 +08:00
Lj Miranda
a3fad0b983
Handle zero suggestions to make tests pass
...
I'm not sure if this is the most elegant solution. But what should
happen is that the _make_span_group function MUST return an empty
SpanGroup if there are no suggestions.
The error happens when the 'scores' variable is empty. We cannot
get the 'predicted' and other downstream vars.
2022-12-21 10:36:01 +08:00
Lj Miranda
9e88108298
Remove init_W and init_B parameters
...
This commit is expected to fail until the new Thinc release.
2022-12-05 08:13:59 +08:00
Lj Miranda
6a10d56caf
Update spancat_exclusive docstring
2022-11-30 15:43:49 +08:00
Lj Miranda
14bf26d3e6
Merge branch 'add/exclusive-spancat' of github.com:ljvmiranda921/spaCy into add/exclusive-spancat
2022-11-29 11:37:16 +08:00
Lj Miranda
a1be07e2da
Put back initializers in spancat config
...
Whenever I remove model.scorer.init_w and model.scorer.init_b,
I encounter an error in the test:
SystemError: <method '__getitem__' of 'dict' objects> returned a result
with an error set.
My Thinc version is 8.1.5, but I can't seem to check what's causing the
error.
2022-11-29 11:32:38 +08:00
Lj Miranda
8138e49764
Update defaults for number of rows
...
Co-authored-by: Adriane Boyd <adrianeboyd@gmail.com>
2022-11-29 11:26:04 +08:00
Lj Miranda
616723e902
Merge branch 'add/exclusive-spancat' of github.com:ljvmiranda921/spaCy into add/exclusive-spancat
2022-11-29 11:15:15 +08:00
Lj Miranda
0b32a949f1
Remove mypy ignore and typecast labels to list
2022-11-29 11:14:43 +08:00
Lj Miranda
14ae4a52c0
Clarify docstring for Exclusive_SpanCategorizer
2022-11-29 11:11:26 +08:00
Lj Miranda
29f156aa1a
Update documentation
...
Update grammar and usage
Co-authored-by: Adriane Boyd <adrianeboyd@gmail.com>
2022-11-29 11:06:35 +08:00
Lj Miranda
bd0562e609
Use DEFAULT_EXCL_SPANCAT_MODEL
...
I also renamed spancat_exclusive_default_config into
spancat_excl_default_config because black does some not pretty
formatting changes.
2022-11-29 11:01:18 +08:00
Lj Miranda
d090ed404e
Remove initializers in default config
2022-11-29 10:56:53 +08:00
Lj Miranda
c9036a6d79
Include zero_init.v1 for spancat
2022-11-18 13:16:33 +08:00
Lj Miranda
e23034365a
Import Suggester from spancat
2022-11-18 12:34:44 +08:00
Lj Miranda
b667ab56a0
Update spacy/pipeline/spancat_exclusive.py
...
Co-authored-by: Adriane Boyd <adrianeboyd@gmail.com>
2022-11-18 12:31:09 +08:00
Lj Miranda
7021dbaff3
Revert documentation link to spancat
2022-11-02 12:43:26 +08:00
Lj Miranda
8548e2c311
Inherit from SpanCat instead of TrainablePipe
...
This commit changes the inheritance structure of Exclusive_Spancat,
now it's inheriting from SpanCategorizer than TrainablePipe. This
allows me to remove duplicate methods that are already present in
the parent function.
2022-11-02 12:30:41 +08:00
Lj Miranda
bdf2a1d1fe
Add _n_labels property to SpanCategorizer
...
Instead of using len(self.labels) in initialize() I am using a private
property self._n_labels. This achieves implementation parity and allows
me to delete the whole initialize() method for spancat_exclusive (since
it's now the same with spancat).
2022-11-02 12:27:54 +08:00
Lj Miranda
023a1a6c04
Add scorer to docstring
2022-11-02 12:10:49 +08:00
Lj Miranda
60a8df7c5f
Merge branch 'add/exclusive-spancat' of github.com:ljvmiranda921/spaCy into add/exclusive-spancat
2022-10-26 11:09:03 +08:00
Lj Miranda
1533a4ef5a
Update component versions to v2
2022-10-26 11:08:49 +08:00
Lj Miranda
1b1afd2251
Update spacy/pipeline/spancat_exclusive.py
...
Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>
2022-10-26 11:07:57 +08:00
Sofie Van Landeghem
95c5bfcc78
avoid multiplication with 1.0
...
Co-authored-by: kadarakos <kadar.akos@gmail.com>
2022-10-03 17:05:55 +02:00
Lj Miranda
2b7eb85e36
Fix mypy errors
...
However, I ignored line 370 because it opened up a bunch of type errors
that might be trickier to solve and might lead to a more complicated
codebase.
2022-09-05 15:42:34 +08:00
Lj Miranda
dbfb3a7739
Cache the label map
2022-09-05 14:34:49 +08:00
Lj Miranda
2bbab641e9
Use Softmax v2 directly from thinc
2022-09-05 11:28:30 +08:00
Lj Miranda
43bf05275f
[ci skip] Small updates
2022-08-25 16:26:03 +08:00
Lj Miranda
b728eaae18
Update spacy/pipeline/spancat_exclusive.py
...
Co-authored-by: kadarakos <kadar.akos@gmail.com>
2022-08-25 16:08:15 +08:00
Lj Miranda
826c1d3ca3
Use spacy.SpanCategorizer.v1 as default archi
2022-08-25 13:31:36 +08:00
Lj Miranda
d6e56b62b9
[ci skip] Add breakpoint for debugging
2022-08-25 13:23:15 +08:00
Lj Miranda
5452e71b05
[WIP] Update
2022-08-25 13:08:37 +08:00
Lj Miranda
3d07c05cba
Add spancat_exclusive to pipeline
2022-08-25 12:40:48 +08:00
Lj Miranda
527a1818e5
Fix all imports
2022-08-25 11:24:37 +08:00
Lj Miranda
1db65b8e78
[wip] Update
2022-08-24 17:54:34 +08:00
Lj Miranda
6f08d83731
Add initial port
2022-08-24 16:47:56 +08:00
Lj Miranda
e7e845b5ed
[wip] Update
2022-08-24 11:35:26 +08:00
Lj Miranda
176ef9840e
[wip] Update
2022-08-24 11:20:22 +08:00