Skip to content

Commit ab27009

Browse files
committed
init
0 parents  commit ab27009

File tree

10 files changed

+694
-0
lines changed

10 files changed

+694
-0
lines changed

.gitignore

Lines changed: 193 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,193 @@
1+
# General
2+
.DS_Store
3+
.AppleDouble
4+
.LSOverride
5+
6+
# Icon must end with two \r
7+
Icon
8+
9+
10+
# Thumbnails
11+
._*
12+
13+
# Files that might appear in the root of a volume
14+
.DocumentRevisions-V100
15+
.fseventsd
16+
.Spotlight-V100
17+
.TemporaryItems
18+
.Trashes
19+
.VolumeIcon.icns
20+
.com.apple.timemachine.donotpresent
21+
22+
# Directories potentially created on remote AFP share
23+
.AppleDB
24+
.AppleDesktop
25+
Network Trash Folder
26+
Temporary Items
27+
.apdisk
28+
29+
# Byte-compiled / optimized / DLL files
30+
__pycache__/
31+
*.py[cod]
32+
*$py.class
33+
34+
# C extensions
35+
*.so
36+
37+
# Distribution / packaging
38+
.Python
39+
build/
40+
develop-eggs/
41+
dist/
42+
downloads/
43+
eggs/
44+
.eggs/
45+
lib/
46+
lib64/
47+
parts/
48+
sdist/
49+
var/
50+
wheels/
51+
share/python-wheels/
52+
*.egg-info/
53+
.installed.cfg
54+
*.egg
55+
MANIFEST
56+
57+
# PyInstaller
58+
# Usually these files are written by a python script from a template
59+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
60+
*.manifest
61+
*.spec
62+
63+
# Installer logs
64+
pip-log.txt
65+
pip-delete-this-directory.txt
66+
67+
# Unit test / coverage reports
68+
htmlcov/
69+
.tox/
70+
.nox/
71+
.coverage
72+
.coverage.*
73+
.cache
74+
nosetests.xml
75+
coverage.xml
76+
*.cover
77+
*.py,cover
78+
.hypothesis/
79+
.pytest_cache/
80+
cover/
81+
82+
# Translations
83+
*.mo
84+
*.pot
85+
86+
# Django stuff:
87+
*.log
88+
local_settings.py
89+
db.sqlite3
90+
db.sqlite3-journal
91+
92+
# Flask stuff:
93+
instance/
94+
.webassets-cache
95+
96+
# Scrapy stuff:
97+
.scrapy
98+
99+
# Sphinx documentation
100+
docs/_build/
101+
102+
# PyBuilder
103+
.pybuilder/
104+
target/
105+
106+
# Jupyter Notebook
107+
.ipynb_checkpoints
108+
109+
# IPython
110+
profile_default/
111+
ipython_config.py
112+
113+
# pyenv
114+
# For a library or package, you might want to ignore these files since the code is
115+
# intended to run in multiple environments; otherwise, check them in:
116+
# .python-version
117+
118+
# pipenv
119+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
120+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
121+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
122+
# install all needed dependencies.
123+
#Pipfile.lock
124+
125+
# poetry
126+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
127+
# This is especially recommended for binary packages to ensure reproducibility, and is more
128+
# commonly ignored for libraries.
129+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
130+
#poetry.lock
131+
132+
# pdm
133+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
134+
#pdm.lock
135+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
136+
# in version control.
137+
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
138+
.pdm.toml
139+
.pdm-python
140+
.pdm-build/
141+
142+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
143+
__pypackages__/
144+
145+
# Celery stuff
146+
celerybeat-schedule
147+
celerybeat.pid
148+
149+
# SageMath parsed files
150+
*.sage.py
151+
152+
# Environments
153+
.env
154+
.venv
155+
env/
156+
venv/
157+
ENV/
158+
env.bak/
159+
venv.bak/
160+
161+
# Spyder project settings
162+
.spyderproject
163+
.spyproject
164+
165+
# Rope project settings
166+
.ropeproject
167+
168+
# mkdocs documentation
169+
/site
170+
171+
# mypy
172+
.mypy_cache/
173+
.dmypy.json
174+
dmypy.json
175+
176+
# Pyre type checker
177+
.pyre/
178+
179+
# pytype static type analyzer
180+
.pytype/
181+
182+
# Cython debug symbols
183+
cython_debug/
184+
185+
# PyCharm
186+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
187+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
188+
# and can be added to the global gitignore or merged into this file. For a more nuclear
189+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
190+
#.idea/
191+
.vscode/
192+
km-5tag-seg-model
193+
km_tokenizer.py

.gitmodules

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[submodule "crfpp"]
2+
path = crfpp
3+
url = https://github.com/taku910/crfpp.git
4+
[submodule "pybind11"]
5+
path = pybind11
6+
url = https://github.com/pybind/pybind11.git

CMakeLists.txt

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
cmake_minimum_required(VERSION 3.8)
2+
3+
project(pycrfpp)
4+
5+
add_subdirectory(pybind11)
6+
pybind11_add_module(${PROJECT_NAME}
7+
src/binding.cpp
8+
9+
crfpp/libcrfpp.cpp
10+
crfpp/lbfgs.cpp
11+
crfpp/param.cpp
12+
crfpp/encoder.cpp
13+
crfpp/feature.cpp
14+
crfpp/feature_cache.cpp
15+
crfpp/feature_index.cpp
16+
crfpp/node.cpp
17+
crfpp/path.cpp
18+
crfpp/tagger.cpp
19+
)
20+
21+
target_compile_definitions(${PROJECT_NAME} PRIVATE HAVE_CONFIG_H)
22+
target_include_directories(${PROJECT_NAME} PRIVATE crfpp)
23+
target_compile_definitions(${PROJECT_NAME} PRIVATE VERSION_INFO=${PYCRFPP_VERSION_INFO})

0 commit comments

Comments
 (0)