piiswrong commented on a change in pull request #10461: allow user to define 
unknown token symbol
URL: https://github.com/apache/incubator-mxnet/pull/10461#discussion_r180152790
 
 

 ##########
 File path: python/mxnet/rnn/io.py
 ##########
 @@ -58,6 +62,8 @@ def encode_sentences(sentences, vocab=None, 
invalid_label=-1, invalid_key='\n',
     if vocab is None:
         vocab = {invalid_key: invalid_label}
         new_vocab = True
+    elif unknown_token:
+        new_vocab = True
 
 Review comment:
   why?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to