Skip to content

Commit

Permalink
Merge pull request #32 from amir-zeldes/dev
Browse files Browse the repository at this point in the history
V3.0.0.2 fix relative module import issue
  • Loading branch information
amir-zeldes authored Jan 20, 2023
2 parents 8eb103c + 5931169 commit f74563a
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 9 deletions.
13 changes: 13 additions & 0 deletions hebpipe/lib/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
try:
from .tt2conll import conllize
from .reorder_sgml import reorder
from .dropout import WordDropout,LockedDropout
from .crfutils.crf import CRF
from .crfutils.viterbi import ViterbiDecoder,ViterbiLoss
except ModuleNotFoundError:
from lib.tt2conll import conllize
from lib.reorder_sgml import reorder
from lib.dropout import WordDropout,LockedDropout
from lib.crfutils.crf import CRF
from lib.crfutils.viterbi import ViterbiDecoder,ViterbiLoss

4 changes: 2 additions & 2 deletions hebpipe/lib/_version.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-

__version__ = "3.0.0.1"
__version__ = "3.0.0.2"
__author__ = "Amir Zeldes"
__copyright__ = "Copyright 2018-2022, Amir Zeldes"
__copyright__ = "Copyright 2018-2023, Amir Zeldes"
__license__ = "Apache 2.0 License"
17 changes: 12 additions & 5 deletions hebpipe/lib/mtlmodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,21 @@


from flair.data import Dictionary, Sentence
from lib.dropout import WordDropout,LockedDropout
from transformers import BertModel,BertTokenizerFast,BertConfig
from random import sample
from collections import defaultdict
from lib.crfutils.crf import CRF
from lib.crfutils.viterbi import ViterbiDecoder,ViterbiLoss
from lib.reorder_sgml import reorder
from lib.tt2conll import conllize
try:
from lib.dropout import WordDropout,LockedDropout
from lib.crfutils.crf import CRF
from lib.crfutils.viterbi import ViterbiDecoder,ViterbiLoss
from lib.reorder_sgml import reorder
from lib.tt2conll import conllize
except ModuleNotFoundError:
from .dropout import WordDropout, LockedDropout
from .crfutils.crf import CRF
from .crfutils.viterbi import ViterbiDecoder, ViterbiLoss
from .reorder_sgml import reorder
from .tt2conll import conllize

from time import time

Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
setup(
name = 'hebpipe',
packages = find_packages(),
version = '3.0.0.1',
version = '3.0.0.2',
description = 'A pipeline for Hebrew NLP',
author = 'Amir Zeldes',
author_email = '[email protected]',
package_data = {'':['README.md','LICENSE.md','requirements.txt'],'hebpipe':['lib/*','data/*','bin/*','models/models_go_here.txt','models/stanza/stanza_models_here.txt']},
install_requires=['requests','numpy','transformers==3.5.1','torch==1.7.1','pandas','scipy','joblib','xgboost==0.81','rftokenizer','depedit','xmltodict', 'diaparser==1.1.2','flair==0.6.1','stanza','conllu','protobuf==3.20.*'],
url = 'https://github.com/amir-zeldes/HebPipe',
license='Apache License, Version 2.0',
download_url = 'https://github.com/amir-zeldes/HebPipe/releases/tag/v3.0.0.1',
download_url = 'https://github.com/amir-zeldes/HebPipe/releases/tag/v3.0.0.2',
keywords = ['NLP', 'Hebrew', 'segmentation', 'tokenization', 'tagging', 'parsing','morphology','POS','lemmatization'],
classifiers = ['Programming Language :: Python',
'Programming Language :: Python :: 2',
Expand Down

0 comments on commit f74563a

Please sign in to comment.