Skip to content

Commit 93d2ab0

Browse files
committed
Fix a bug in the count vectors featuriser: Prevent OOV substitution when the featuriser operates at character level.
1 parent 44bc6c8 commit 93d2ab0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rasa/nlu/featurizers/count_vectors_featurizer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ def _get_message_text(self, message):
172172
if self.lowercase:
173173
text = text.lower()
174174

175-
if self.OOV_token:
175+
if self.OOV_token and self.analyzer == "word":
176176
text_tokens = text.split()
177177
if hasattr(self.vectorizer, "vocabulary_"):
178178
# CountVectorizer is trained, process for prediction

0 commit comments

Comments
 (0)