• 大小: 47.11MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-07-17
  • 语言: Python
  • 标签: Python  Win10  Gensim  

资源简介

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\basemodel.py

     文件      68928  2019-06-07 09:44  gensim-3.8.0\build\lib.win-amd64-3.7\gensim\models\base_any2vec.py

     文件      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个文件信息

评论

共有 条评论