Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version - 0.0.18 #20

Merged
merged 4 commits into from
Dec 5, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
n_jobs in CLI
mgraffg committed Dec 5, 2024
commit 7071520e258016e3ff4df98959e95825cd73ec6d
2 changes: 1 addition & 1 deletion encexp/__init__.py
Original file line number Diff line number Diff line change
@@ -17,4 +17,4 @@
if not '-m' in sys.argv:
from encexp.text_repr import EncExp

__version__ = "0.0.17"
__version__ = "0.0.18"
5 changes: 5 additions & 0 deletions encexp/build_encexp.py
Original file line number Diff line number Diff line change
@@ -183,13 +183,15 @@ def main(args):
filename = args.file[0]
output = args.output
vocabulary = args.vocabulary
n_jobs = args.n_jobs
voc = next(tweet_iterator(vocabulary))
min_pos = args.min_pos
estimator_kwargs = None
if args.intercept:
estimator_kwargs = dict(fit_intercept=True)
build_encexp(voc, filename, output,
min_pos=min_pos, limit=args.limit,
n_jobs=n_jobs,
estimator_kwargs=estimator_kwargs)


@@ -213,6 +215,9 @@ def main(args):
parser.add_argument('--intercept',
help='Estimate the intercept',
dest='intercept', action='store_true')
parser.add_argument('--n-jobs',
help='Number of jobs',
dest='n_jobs', type=int, default=-1)
parser.add_argument('file',
help='Input filename',
nargs=1, type=str)