зеркало из
				https://github.com/ssciwr/AMMICO.git
				synced 2025-10-31 14:06:04 +02:00 
			
		
		
		
	round sentiment score (#119)
* round sentiment score * Update test_text.py increased assert range
Этот коммит содержится в:
		
							родитель
							
								
									7d650caaef
								
							
						
					
					
						Коммит
						ceec46a91c
					
				| @ -94,7 +94,7 @@ def test_text_sentiment_transformers(): | ||||
|     mydict["text_english"] = "I am happy that the CI is working again." | ||||
|     test_obj.text_sentiment_transformers() | ||||
|     assert mydict["sentiment"] == "POSITIVE" | ||||
|     assert mydict["sentiment_score"] == pytest.approx(0.99, 0.01) | ||||
|     assert mydict["sentiment_score"] == pytest.approx(0.99, 0.02) | ||||
| 
 | ||||
| 
 | ||||
| @pytest.mark.win_skip | ||||
|  | ||||
| @ -133,7 +133,7 @@ class TextDetector(AnalysisMethod): | ||||
|         ) | ||||
|         result = pipe(self.subdict["text_english"]) | ||||
|         self.subdict["sentiment"] = result[0]["label"] | ||||
|         self.subdict["sentiment_score"] = result[0]["score"] | ||||
|         self.subdict["sentiment_score"] = round(result[0]["score"], 2) | ||||
| 
 | ||||
|     def text_ner(self): | ||||
|         """Perform named entity recognition on the text using the Transformers pipeline.""" | ||||
|  | ||||
		Загрузка…
	
	
			
			x
			
			
		
	
		Ссылка в новой задаче
	
	Block a user
	 GwydionJon
						GwydionJon