Sfoglia il codice sorgente

Update postprocess_utils.py

hnluo 3 anni fa
parent
commit
85e8e0ed0d
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      funasr/utils/postprocess_utils.py

+ 1 - 1
funasr/utils/postprocess_utils.py

@@ -225,7 +225,7 @@ def sentence_postprocess(words: List[Any], time_stamp: List[List] = None):
                     ts_lists.append([begin, end])
                     begin = end
             else:
-                raise ValueError('invalid character: {}'.format(ch))
+                word_lists.append(ch)
 
     if time_stamp is not None: 
         word_lists, ts_lists = abbr_dispose(word_lists, ts_lists)