class_docstr: Use Bert to generate words.
  
  Example::
  
      小明喜欢看书 -> 小明喜欢看报纸
code: def is_word(sentence):
      from ltp import LTP
  
      r""" 
          Judge whether it is a word.
  
          :param str sentence: input sentence string
              sentence: input sentence string
          :return bool: is a word or not
          
          """
      if sentence[0] == sentence[1]:
          return True
      ltp = LTP()
      seg, hidden = ltp.seg([sentence])
      pos = ltp.pos(hidden)
      pos = pos[0]
      if len(pos) == 1 and pos[0] == "n":
          return False
      return True
  
file_path: textflint/textflint/generation/transformation/CWS/cn_mlm.py
imports: import torch
  from transformers import BertTokenizer, BertForMaskedLM
  from ..transformation import Transformation
  from ....input.component.field.cn_text_field import CnTextField
  from ....common.preprocess.cn_processor import CnProcessor
  from ....common.settings import ORIGIN, MODIFIED_MASK
label_desc: Use image node_id 6 for calling the CnMLM obj's underlying member method code with example usage: obj.is_word(sentence) and returns: True, True, False