mirror of
				https://github.com/explosion/spaCy.git
				synced 2025-11-04 09:57:26 +03:00 
			
		
		
		
	This reverts commit daedc45d05.
The default length depends on the length of the pattern string and was
correct for this example.
			
			
This commit is contained in:
		
							parent
							
								
									acdd993071
								
							
						
					
					
						commit
						4539fbae17
					
				| 
						 | 
					@ -384,10 +384,10 @@ the more specific attributes `FUZZY1`..`FUZZY9` you can specify the maximum
 | 
				
			||||||
allowed edit distance directly.
 | 
					allowed edit distance directly.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
```python
 | 
					```python
 | 
				
			||||||
# Match lowercase with fuzzy matching (allows 2 edits by default)
 | 
					# Match lowercase with fuzzy matching (allows 3 edits)
 | 
				
			||||||
pattern = [{"LOWER": {"FUZZY": "definitely"}}]
 | 
					pattern = [{"LOWER": {"FUZZY": "definitely"}}]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Match custom attribute values with fuzzy matching (allows 2 edits by default)
 | 
					# Match custom attribute values with fuzzy matching (allows 3 edits)
 | 
				
			||||||
pattern = [{"_": {"country": {"FUZZY": "Kyrgyzstan"}}}]
 | 
					pattern = [{"_": {"country": {"FUZZY": "Kyrgyzstan"}}}]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Match with exact Levenshtein edit distance limits (allows 4 edits)
 | 
					# Match with exact Levenshtein edit distance limits (allows 4 edits)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -70,13 +70,13 @@ distance of 2 and up to 30% of the pattern string length. `FUZZY1`..`FUZZY9` can
 | 
				
			||||||
be used to specify the exact number of allowed edits.
 | 
					be used to specify the exact number of allowed edits.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
```python
 | 
					```python
 | 
				
			||||||
# Match lowercase with fuzzy matching (allows 2 edits by default)
 | 
					# Match lowercase with fuzzy matching (allows up to 3 edits)
 | 
				
			||||||
pattern = [{"LOWER": {"FUZZY": "definitely"}}]
 | 
					pattern = [{"LOWER": {"FUZZY": "definitely"}}]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Match custom attribute values with fuzzy matching (allows 2 edits by default)
 | 
					# Match custom attribute values with fuzzy matching (allows up to 3 edits)
 | 
				
			||||||
pattern = [{"_": {"country": {"FUZZY": "Kyrgyzstan"}}}]
 | 
					pattern = [{"_": {"country": {"FUZZY": "Kyrgyzstan"}}}]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Match with exact Levenshtein edit distance limits (allows 4 edits)
 | 
					# Match with exact Levenshtein edit distance limits (allows up to 4 edits)
 | 
				
			||||||
pattern = [{"_": {"country": {"FUZZY4": "Kyrgyzstan"}}}]
 | 
					pattern = [{"_": {"country": {"FUZZY4": "Kyrgyzstan"}}}]
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user