Commit f6ed07b
Kabir Khan
Use nlp.pipe in EntityRuler for phrase patterns in add_patterns (#4931)
* Fix ent_ids and labels properties when id attribute used in patterns
* use set for labels
* sort end_ids for comparison in entity_ruler tests
* fixing entity_ruler ent_ids test
* add to set
* Run make_doc optimistically if using phrase matcher patterns.
* remove unused coveragerc I was testing with
* format
* Refactor EntityRuler.add_patterns to use nlp.pipe for phrase patterns. Improves speed substantially.
* Removing old add_patterns function
* Fixing spacing
* Make sure token_patterns loaded as well, before generator was being emptied in from_disk1 parent 72c964b commit f6ed07b
File tree
2 files changed
+65
-3
lines changed- spacy/pipeline
- website/docs/usage
2 files changed
+65
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
| 165 | + | |
165 | 166 | | |
166 | 167 | | |
167 | 168 | | |
| |||
194 | 195 | | |
195 | 196 | | |
196 | 197 | | |
| 198 | + | |
197 | 199 | | |
198 | 200 | | |
199 | 201 | | |
| |||
203 | 205 | | |
204 | 206 | | |
205 | 207 | | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
206 | 213 | | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
207 | 235 | | |
208 | 236 | | |
209 | 237 | | |
| |||
212 | 240 | | |
213 | 241 | | |
214 | 242 | | |
215 | | - | |
216 | | - | |
| 243 | + | |
| 244 | + | |
217 | 245 | | |
218 | 246 | | |
219 | 247 | | |
| |||
226 | 254 | | |
227 | 255 | | |
228 | 256 | | |
| 257 | + | |
| 258 | + | |
229 | 259 | | |
230 | 260 | | |
231 | 261 | | |
| |||
239 | 269 | | |
240 | 270 | | |
241 | 271 | | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
242 | 275 | | |
243 | 276 | | |
244 | 277 | | |
| |||
250 | 283 | | |
251 | 284 | | |
252 | 285 | | |
| 286 | + | |
253 | 287 | | |
254 | 288 | | |
255 | 289 | | |
| |||
292 | 326 | | |
293 | 327 | | |
294 | 328 | | |
| 329 | + | |
295 | 330 | | |
296 | 331 | | |
297 | 332 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1096 | 1096 | | |
1097 | 1097 | | |
1098 | 1098 | | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
1099 | 1126 | | |
1100 | 1127 | | |
1101 | 1128 | | |
| |||
0 commit comments