自然语言处理python进阶(二)
生活随笔
收集整理的這篇文章主要介紹了
自然语言处理python进阶(二)
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
python字符串的簡單使用
namesList = ['Tuffy','Ali','Nysha','Tim' ] sentence = 'My dog sleeps on sofa'names = ';'.join(namesList) print(type(names), ':', names) wordList = sentence.split(' ') print((type(wordList)), ':', wordList) additionExample = 'ganehsa' + 'ganesha' + 'ganesha' multiplicationExample = 'ganesha' * 2 print('Text Additions :', additionExample) print('Text Multiplication :', multiplicationExample) str = 'Python NLTK' print(str[1]) print(str[-3])使用python讀取pdf
from PyPDF2 import PdfFileReaderdef getTextPDF(pdfFileName, password = ''):# 打開pdf_file = open(pdfFileName, 'rb')# 讀取read_pdf = PdfFileReader(pdf_file)if password != '':read_pdf.decryp總結(jié)
以上是生活随笔為你收集整理的自然语言处理python进阶(二)的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 亚马逊美国站陶瓷加热灯UL482测试标准
- 下一篇: 奉化哪里有笋罐头空瓶批发?