我正在使用Windows注册表做一些工作.根据您是以32位还是64位运行python,键值将不同.如何检测Python是作为64位应用程序而不是32位应用程序运行?
注意:我对检测32位/ 64位Windows不感兴趣 - 只是Python平台.
有谁知道我将如何检测Windows在Python下的位版本.我需要知道这是一种为Program Files使用正确文件夹的方法.
非常感谢
我已经教过一些用Python进行文本挖掘的入门课程,并且该课程尝试了与提供的练习文本类似的方法.有些学生对text1.similar()的结果与其他学生不同.
所有版本等都是一样的.
有谁知道为什么会出现这些差异?谢谢.
在命令行使用的代码.
python
>>> import nltk
>>> nltk.download() #here you use the pop-up window to download texts
>>> from nltk.book import *
*** Introductory Examples for the NLTK Book ***
Loading text1, ..., text9 and sent1, ..., sent9
Type the name of the text or sentence to view it.
Type: 'texts()' or 'sents()' to list the materials.
text1: Moby Dick by Herman Melville 1851
text2: Sense and Sensibility by Jane Austen 1811
text3: The Book of Genesis
text4: …Run Code Online (Sandbox Code Playgroud)