资源简介
Win10下Gensim 3.8编译包,能大大提高词向量训练速度。
Python3.7 64位,VS2015编译。
解压后,用python setup.py install命令安装。
多台电脑测试可用。
代码片段和文件信息
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2014 Radim Rehurek
# Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html
“““
Run with:
sudo python ./setup.py install
“““
import os
import platform
import sys
import warnings
from setuptools import setup find_packages Extension
from setuptools.command.build_ext import build_ext
PY2 = sys.version_info[0] == 2
if sys.version_info[:2] < (2 7) or ((3 0) <= sys.version_info[:2] < (3 5)):
raise Exception(‘This version of gensim needs Python 2.7 3.5 or later.‘)
# the following code is adapted from tornado‘s setup.py:
# https://github.com/tornadoweb/tornado/blob/master/setup.py
# to support installing without the extension on platforms where
# no compiler is available.
class custom_build_ext(build_ext):
“““Allow C extension building to fail.
The C extension speeds up word2vec and doc2vec training but is not essential.
“““
warning_message = “““
********************************************************************
WARNING: %s could not
be compiled. No C extensions are essential for gensim to run
although they do result in significant speed improvements for some modules.
%s
Here are some hints for popular operating systems:
If you are seeing this message on Linux you probably need to
install GCC and/or the Python development package for your
version of Python.
Debian and Ubuntu users should issue the following command:
$ sudo apt-get install build-essential python-dev
RedHat CentOS and Fedora users should issue the following command:
$ sudo yum install gcc python-devel
If you are seeing this message on OSX please read the documentation
here:
http://api.mongodb.org/python/current/installation.html#osx
********************************************************************
“““
def run(self):
try:
build_ext.run(self)
except Exception:
e = sys.exc_info()[1]
sys.stdout.write(‘%s\n‘ % str(e))
warnings.warn(
self.warning_message +
“Extension modules“ +
“There was an issue with your platform configuration - see above.“)
def build_extension(self ext):
name = ext.name
try:
build_ext.build_extension(self ext)
except Exception:
e = sys.exc_info()[1]
sys.stdout.write(‘%s\n‘ % str(e))
warnings.warn(
self.warning_message +
“The %s extension module“ % (name) +
“The output above this warning shows how the compilation failed.“)
# the following is needed to be able to add numpy‘s include dirs... without
# importing numpy directly in this script before it‘s actually installed!
# http://stackoverflow.com/questions/19919905/how-to-bootstrap-numpy-installation-in-setup-py
def finalize_options(self):
build_ext.finalize_options(self)
# Prevent numpy
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 5776 2019-07-09 08:10 gensim-3.8.0\build\lib.win-amd64-3.7\gensim\corpora\bleicorpus.py
文件 2057 2019-07-09 08:10 gensim-3.8.0\build\lib.win-amd64-3.7\gensim\corpora\csvcorpus.py
文件 29180 2019-07-09 08:10 gensim-3.8.0\build\lib.win-amd64-3.7\gensim\corpora\dictionary.py
文件 13293 2019-07-09 08:10 gensim-3.8.0\build\lib.win-amd64-3.7\gensim\corpora\hashdictionary.py
文件 6458 2019-02-02 19:25 gensim-3.8.0\build\lib.win-amd64-3.7\gensim\corpora\indexedcorpus.py
文件 9855 2019-07-09 08:10 gensim-3.8.0\build\lib.win-amd64-3.7\gensim\corpora\lowcorpus.py
文件 7693 2019-07-09 08:10 gensim-3.8.0\build\lib.win-amd64-3.7\gensim\corpora\malletcorpus.py
文件 4529 2019-01-10 09:20 gensim-3.8.0\build\lib.win-amd64-3.7\gensim\corpora\mmcorpus.py
文件 33330 2019-02-02 19:25 gensim-3.8.0\build\lib.win-amd64-3.7\gensim\corpora\sharded_corpus.py
文件 6062 2019-07-09 08:10 gensim-3.8.0\build\lib.win-amd64-3.7\gensim\corpora\svmlightcorpus.py
文件 25356 2019-01-10 09:20 gensim-3.8.0\build\lib.win-amd64-3.7\gensim\corpora\textcorpus.py
文件 9608 2019-07-09 08:10 gensim-3.8.0\build\lib.win-amd64-3.7\gensim\corpora\ucicorpus.py
文件 26111 2019-01-10 09:20 gensim-3.8.0\build\lib.win-amd64-3.7\gensim\corpora\wikicorpus.py
文件 453316 2019-07-09 08:31 gensim-3.8.0\build\lib.win-amd64-3.7\gensim\corpora\_mmreader.c
文件 98304 2019-09-05 12:25 gensim-3.8.0\build\lib.win-amd64-3.7\gensim\corpora\_mmreader.cp37-win_amd64.pyd
文件 7474 2019-07-09 08:10 gensim-3.8.0\build\lib.win-amd64-3.7\gensim\corpora\_mmreader.pyx
文件 768 2018-12-08 13:47 gensim-3.8.0\build\lib.win-amd64-3.7\gensim\corpora\__init__.py
文件 283 2019-01-07 12:24 gensim-3.8.0\build\lib.win-amd64-3.7\gensim\decorator.py
文件 16879 2019-07-09 08:10 gensim-3.8.0\build\lib.win-amd64-3.7\gensim\downloader.py
文件 15173 2019-02-02 19:25 gensim-3.8.0\build\lib.win-amd64-3.7\gensim\interfaces.py
文件 54742 2019-07-09 08:10 gensim-3.8.0\build\lib.win-amd64-3.7\gensim\matutils.py
文件 52468 2019-02-02 19:25 gensim-3.8.0\build\lib.win-amd64-3.7\gensim\models\atmodel.py
文件 1561 2019-01-10 09:20 gensim-3.8.0\build\lib.win-amd64-3.7\gensim\models\ba
文件 68928 2019-06-07 09:44 gensim-3.8.0\build\lib.win-amd64-3.7\gensim\models\ba
文件 25104 2019-02-02 19:25 gensim-3.8.0\build\lib.win-amd64-3.7\gensim\models\callbacks.py
文件 26191 2019-01-10 09:20 gensim-3.8.0\build\lib.win-amd64-3.7\gensim\models\coherencemodel.py
文件 47133 2019-07-09 08:10 gensim-3.8.0\build\lib.win-amd64-3.7\gensim\models\deprecated\doc2vec.py
文件 32535 2019-02-21 10:05 gensim-3.8.0\build\lib.win-amd64-3.7\gensim\models\deprecated\fasttext.py
文件 18166 2019-01-10 09:20 gensim-3.8.0\build\lib.win-amd64-3.7\gensim\models\deprecated\fasttext_wrapper.py
文件 44873 2019-07-09 08:10 gensim-3.8.0\build\lib.win-amd64-3.7\gensim\models\deprecated\keyedvectors.py
............此处省略897个文件信息
相关资源
- Python金融大数据分析,带目录
- Python计算机视觉编程(含源码+python计
- python机器学习及实践
- Python机器学习实践指南.pdf+代码+数据
- Python 3.6.1+Scrapy 1.1.0rc3
- Python机器学习Sebastian著-带书签
- Learning Python(3rd.Edition.完整书签目录
- 基于知识图谱的智能问答系统python实
- Python程序设计-董付国第二版教学课件
- python核心编程+python基础教程+流畅的
- pyqt4-4.11 for python 2.7
- Effective python 中英文 pdf
- Artificial Intelligence with Python 无水印p
- python-3.6.4-amd64
- 图灵书籍(Python数据分析基础.pdf+Py
- 基于Python的http流抓取系统
- python-3.6.3.exe zip包
- Python3-教程
- 吴恩达机器学习python代码
- opencv_python-3.4.2.16-cp35-cp35m-win_amd64.wh
- Python机器学习经典及随书代码
- 深度学习入门:基于Python的理论与实
- Django for Beginners: Learn web development wi
- Data Analytics with Spark Using Python
- 《深度学习入门:基于Python的理论与
- 01_python基础_版本.pdf
- 外星人入侵源代码
- pynaoqi-python2.7-2.1.4.13-win32-vs2010.zip
- Python Machine Learning - Second Edition
- Python-微信跳一跳辅助的App实现
评论
共有 条评论