Skip to content

Commit

Permalink
python3
Browse files Browse the repository at this point in the history
  • Loading branch information
isnowfy committed Dec 9, 2013
1 parent 95a4503 commit 11cfbcc
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
include *.md
recursive-include snownlp *.txt *.marshal
recursive-include snownlp *.txt *.marshal *.marshal.3
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ s.sim([u'文章'])# [0.3756070762985226, 0, 0]
* tf,idf
* Tokenization(分割成句子)
* 文本相似([BM25](http://en.wikipedia.org/wiki/Okapi_BM25)
* 支持python3(感谢[erning](https://github.com/erning)

## Get It now

Expand Down
16 changes: 9 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
import sys
import subprocess

Expand All @@ -10,11 +11,11 @@
def _find_packages(where='.', exclude=()):
"""Return a list all Python packages found within directory 'where'
'where' should be supplied as a "cross-platform" (i.e. URL-style) path; it
will be converted to the appropriate local path syntax. 'exclude' is a
sequence of package names to exclude; '*' can be used as a wildcard in the
names, such that 'foo.*' will exclude all subpackages of 'foo' (but not
'foo' itself).
'where' should be supplied as a "cross-platform" (i.e. URL-style)
path; it will be converted to the appropriate local path syntax.
'exclude' is a sequence of package names to exclude; '*' can be used
as a wildcard in the names, such that 'foo.*' will exclude all
subpackages of 'foo' (but not 'foo' itself).
"""
out = []
stack = [(convert_path(where), '')]
Expand All @@ -36,14 +37,15 @@ def _find_packages(where='.', exclude=()):
status = subprocess.call(PUBLISH_CMD, shell=True)
sys.exit(status)


def read(fname):
with open(fname) as fp:
content = fp.read()
return content

setup(
name='snownlp',
version='0.9',
version='0.9.3',
description='Python library for processing Chinese text',
author='isnowfy',
url='https://github.com/isnowfy/snownlp',
Expand All @@ -55,6 +57,6 @@ def read(fname):
'Programming Language :: Python',

],
package_data={'': ['*.md', '*.txt', '*.marshal']},
package_data={'': ['*.md', '*.txt', '*.marshal', '*.marshal.3']},
include_package_data=True,
)

0 comments on commit 11cfbcc

Please sign in to comment.