mirror of
				https://github.com/explosion/spaCy.git
				synced 2025-10-31 16:07:41 +03:00 
			
		
		
		
	Merge pull request #447 from stared/patch-1
fixed sense2vec blog post code
This commit is contained in:
		
						commit
						8c24fd2928
					
				|  | @ -37,7 +37,7 @@ p Here's how the current pre-processing function looks, at the time of writing. | ||||||
|                         # Merge them into single tokens |                         # Merge them into single tokens | ||||||
|                         ent.merge(ent.root.tag_, ent.text, ent.label_) |                         ent.merge(ent.root.tag_, ent.text, ent.label_) | ||||||
|             token_strings = [] |             token_strings = [] | ||||||
|             for token in tokens: |             for token in doc: | ||||||
|                 text = token.text.replace(' ', '_') |                 text = token.text.replace(' ', '_') | ||||||
|                 tag = token.ent_type_ or token.pos_ |                 tag = token.ent_type_ or token.pos_ | ||||||
|                 token_strings.append('%s|%s' % (text, tag)) |                 token_strings.append('%s|%s' % (text, tag)) | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user