Skip to content

Commit 1e3c8f9

Browse files
author
jhoetter
committed
adds README with simplistic example and updates setup.py
1 parent c086497 commit 1e3c8f9

File tree

2 files changed

+25
-47
lines changed

2 files changed

+25
-47
lines changed

README.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,21 @@
11
# sequence-learn
2-
Sklearn-like API for Sequence Learning tasks like Named Entity Recognition
2+
Sklearn-like API for Sequence Learning tasks like Named Entity Recognition.
3+
4+
`sequence-learn` takes as input embedded token lists, which you can produce using e.g. Spacy or NLTK for tokenization and Sklearn or Hugging Face for the embedding procedure. The labels are on token-level, i.e., for each token, you must provide some information in a simple list.
5+
6+
## Example
7+
```python
8+
# some token-level embedding, e.g. based on character embeddings
9+
x = [[
10+
[0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0],
11+
[0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0],
12+
],[
13+
[0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0],
14+
[0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0],
15+
[1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0]
16+
]]
17+
18+
# token-level labels, where OUTSIDE means that this token contains no label
19+
y = [["OUTSIDE", "LABEL-1"],
20+
["LABEL-2","LABEL-1","OUTSIDE"]]
21+
```

setup.py

Lines changed: 5 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -25,51 +25,10 @@
2525
package_dir={"": "."},
2626
packages=find_packages("."),
2727
install_requires=[
28-
"absl-py==1.0.0",
29-
"astunparse==1.6.3",
30-
"black==21.12b0",
31-
"cachetools==4.2.4",
32-
"certifi==2021.10.8",
33-
"charset-normalizer==2.0.10",
34-
"click==8.0.3",
35-
"flatbuffers==2.0",
36-
"gast==0.4.0",
37-
"google-auth==2.3.3",
38-
"google-auth-oauthlib==0.4.6",
39-
"google-pasta==0.2.0",
40-
"grpcio==1.43.0",
41-
"h5py==3.6.0",
42-
"idna==3.3",
43-
"importlib-metadata==4.10.0",
44-
"keras==2.7.0",
45-
"Keras-Preprocessing==1.1.2",
46-
"libclang==12.0.0",
47-
"Markdown==3.3.6",
48-
"mypy-extensions==0.4.3",
49-
"numpy==1.21.5",
50-
"oauthlib==3.1.1",
51-
"opt-einsum==3.3.0",
52-
"pathspec==0.9.0",
53-
"platformdirs==2.4.1",
54-
"protobuf==3.19.3",
55-
"pyasn1==0.4.8",
56-
"pyasn1-modules==0.2.8",
57-
"requests==2.27.1",
58-
"requests-oauthlib==1.3.0",
59-
"rsa==4.8",
60-
"six==1.16.0",
61-
"tensorboard==2.7.0",
62-
"tensorboard-data-server==0.6.1",
63-
"tensorboard-plugin-wit==1.8.1",
64-
"tensorflow-estimator==2.7.0",
65-
"tensorflow-gpu==2.7.0",
66-
"tensorflow-io-gcs-filesystem==0.23.1",
67-
"termcolor==1.1.0",
68-
"tomli==1.2.3",
69-
"typing-extensions==4.0.1",
70-
"urllib3==1.26.8",
71-
"Werkzeug==2.0.2",
72-
"wrapt==1.13.3",
73-
"zipp==3.7.0",
28+
"joblib==1.1.0",
29+
"numpy==1.22.3",
30+
"scikit-learn==1.0.2",
31+
"scipy==1.8.0",
32+
"threadpoolctl==3.1.0",
7433
],
7534
)

0 commit comments

Comments
 (0)