Skip to content

Commit d7c80b1

Browse files
committed
move depenednecis to setup file only
1 parent 563dbbd commit d7c80b1

File tree

3 files changed

+15
-12
lines changed

3 files changed

+15
-12
lines changed

examples/align_files.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
import codecs
33
import argparse
44
from simalign import EmbeddingLoader, SentenceAligner
5-
import simalign.utils as utils
6-
7-
LOG = utils.get_logger(__name__)
85

96

107
def gather_null_aligns(sim_matrix, inter_matrix):
@@ -64,7 +61,7 @@ def apply_percentile_null_aligns(sim_matrix, ratio=1.0):
6461
args.model = "tr:xlm-roberta-base"
6562
if args.model[3:] not in TR_Models:
6663
raise ValueError("The model '{}' is not recognised!".format(args.model))
67-
LOG.info(args)
64+
print(args)
6865

6966
langs = [args.L1_path, args.L2_path]
7067
max_sent_id = args.num_test_sents
@@ -101,7 +98,7 @@ def apply_percentile_null_aligns(sim_matrix, ratio=1.0):
10198

10299
corpora_lengths = [len(corpus) for corpus in original_corpora]
103100
if min(corpora_lengths) != max(corpora_lengths):
104-
LOG.info(corpora_lengths)
101+
print(corpora_lengths)
105102
raise ValueError('Cannot load parallel corpus.')
106103

107104
# --------------------------------------------------------

requirements.txt

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1 @@
1-
numpy==1.17.2
2-
torch==1.5.0
3-
scipy==1.4.1
4-
transformers==2.3.0
5-
regex==2020.4.4
6-
networkx==2.4
7-
scikit_learn==0.22.2.post1
1+
.

simalign/setup.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,23 @@
11
from setuptools import setup
22

3+
34
setup(name='simalign',
45
version='0.1',
56
description='Word Alignments using Pretrained Language Models',
7+
keywords="NLP deep learning transformer pytorch BERT Word Alignment",
68
url='https://github.com/masoudjs/simalign',
79
author='Masoud Jalili Sabet, Philipp Dufter',
810
911
license='GPL-3.0',
1012
packages=['simalign'],
13+
install_requires=[
14+
"numpy"
15+
"torch"
16+
"scipy"
17+
"transformers == 2.3.0"
18+
"regex"
19+
"networkx == 2.4"
20+
"scikit_learn"
21+
],
22+
python_requires=">=3.6.0",
1123
zip_safe=False)

0 commit comments

Comments
 (0)