mirror of
				https://github.com/explosion/spaCy.git
				synced 2025-11-04 01:48:04 +03:00 
			
		
		
		
	Merge branch 'develop' of https://github.com/explosion/spaCy into develop
This commit is contained in:
		
						commit
						e485241003
					
				| 
						 | 
					@ -8,7 +8,6 @@ from spacy import displacy
 | 
				
			||||||
from ..util import get_doc
 | 
					from ..util import get_doc
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@pytest.mark.xfail
 | 
					 | 
				
			||||||
def test_issue3288(en_vocab):
 | 
					def test_issue3288(en_vocab):
 | 
				
			||||||
    """Test that retokenization works correctly via displaCy when punctuation
 | 
					    """Test that retokenization works correctly via displaCy when punctuation
 | 
				
			||||||
    is merged onto the preceeding token and tensor is resized."""
 | 
					    is merged onto the preceeding token and tensor is resized."""
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -222,7 +222,7 @@ def _bulk_merge(Doc doc, merges):
 | 
				
			||||||
    # whether the row is to be deleted, then use numpy.delete
 | 
					    # whether the row is to be deleted, then use numpy.delete
 | 
				
			||||||
    if doc.tensor is not None and doc.tensor.size != 0:
 | 
					    if doc.tensor is not None and doc.tensor.size != 0:
 | 
				
			||||||
        doc.tensor = _resize_tensor(doc.tensor,
 | 
					        doc.tensor = _resize_tensor(doc.tensor,
 | 
				
			||||||
            [(m[1][0].start, m[1][0].end) for m in merges])
 | 
					            [(m[0].start, m[0].end) for m in merges])
 | 
				
			||||||
    # Memorize span roots and sets dependencies of the newly merged
 | 
					    # Memorize span roots and sets dependencies of the newly merged
 | 
				
			||||||
    # tokens to the dependencies of their roots.
 | 
					    # tokens to the dependencies of their roots.
 | 
				
			||||||
    span_roots = []
 | 
					    span_roots = []
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user