我正在尝试找到一种使用nltk模块在Python中拆分单词的方法。考虑到我拥有的原始数据(例如带符号词的列表),我不确定如何达到我的目标
['usingvariousmolecularbiology', 'techniques', 'toproduce', 'genotypes', 'following', 'standardoperatingprocedures', '.', 'Operateandmaintainautomatedequipment', '.', 'Updatesampletrackingsystemsandprocess', 'documentation', 'toallowaccurate', 'monitoring', 'andrapid', 'progression', 'ofcasework']
Run Code Online (Sandbox Code Playgroud)
如您所见,许多单词被粘在一起(即“ to”和“ produce”被粘在一个字符串“ toproduce”中)。这是从PDF文件中抓取数据的一种人工产物,我想找到一种使用python中的nltk模块将卡住的单词拆分(即,将“ toproduce”拆分为两个单词:“ to”和“ produce”的方法);将“ standardoperatingprocedures”分为三个词:“ standard”,“ operating”,“ procedures”)。
感谢您的帮助!
python text-processing text-analysis nltk python-textprocessing