wbtools 3.0.2__tar.gz → 3.0.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {wbtools-3.0.2 → wbtools-3.0.4}/PKG-INFO +1 -1
- {wbtools-3.0.2 → wbtools-3.0.4}/setup.py +1 -1
- {wbtools-3.0.2 → wbtools-3.0.4}/wbtools/literature/paper.py +7 -4
- {wbtools-3.0.2 → wbtools-3.0.4}/wbtools.egg-info/PKG-INFO +1 -1
- {wbtools-3.0.2 → wbtools-3.0.4}/LICENSE +0 -0
- {wbtools-3.0.2 → wbtools-3.0.4}/README.md +0 -0
- {wbtools-3.0.2 → wbtools-3.0.4}/setup.cfg +0 -0
- {wbtools-3.0.2 → wbtools-3.0.4}/tests/__init__.py +0 -0
- {wbtools-3.0.2 → wbtools-3.0.4}/tests/config_reader.py +0 -0
- {wbtools-3.0.2 → wbtools-3.0.4}/tests/db/__init__.py +0 -0
- {wbtools-3.0.2 → wbtools-3.0.4}/tests/db/test_afp.py +0 -0
- {wbtools-3.0.2 → wbtools-3.0.4}/tests/db/test_antibody.py +0 -0
- {wbtools-3.0.2 → wbtools-3.0.4}/tests/db/test_expression.py +0 -0
- {wbtools-3.0.2 → wbtools-3.0.4}/tests/db/test_generic.py +0 -0
- {wbtools-3.0.2 → wbtools-3.0.4}/tests/lib/__init__.py +0 -0
- {wbtools-3.0.2 → wbtools-3.0.4}/tests/lib/entity_extraction/__init__.py +0 -0
- {wbtools-3.0.2 → wbtools-3.0.4}/tests/lib/entity_extraction/test_email_addresses.py +0 -0
- {wbtools-3.0.2 → wbtools-3.0.4}/tests/lib/entity_extraction/test_generic.py +0 -0
- {wbtools-3.0.2 → wbtools-3.0.4}/tests/lib/entity_extraction/test_new_variations.py +0 -0
- {wbtools-3.0.2 → wbtools-3.0.4}/tests/lib/test_literature_index.py +0 -0
- {wbtools-3.0.2 → wbtools-3.0.4}/tests/lib/test_scraping.py +0 -0
- {wbtools-3.0.2 → wbtools-3.0.4}/tests/lib/test_text_preprocessing.py +0 -0
- {wbtools-3.0.2 → wbtools-3.0.4}/tests/lib/test_text_similarity.py +0 -0
- {wbtools-3.0.2 → wbtools-3.0.4}/tests/literature/__init__.py +0 -0
- {wbtools-3.0.2 → wbtools-3.0.4}/tests/literature/test_corpus.py +0 -0
- {wbtools-3.0.2 → wbtools-3.0.4}/tests/literature/test_paper.py +0 -0
- {wbtools-3.0.2 → wbtools-3.0.4}/wbtools/__init__.py +0 -0
- {wbtools-3.0.2 → wbtools-3.0.4}/wbtools/db/__init__.py +0 -0
- {wbtools-3.0.2 → wbtools-3.0.4}/wbtools/db/abstract_manager.py +0 -0
- {wbtools-3.0.2 → wbtools-3.0.4}/wbtools/db/afp.py +0 -0
- {wbtools-3.0.2 → wbtools-3.0.4}/wbtools/db/antibody.py +0 -0
- {wbtools-3.0.2 → wbtools-3.0.4}/wbtools/db/dbmanager.py +0 -0
- {wbtools-3.0.2 → wbtools-3.0.4}/wbtools/db/expression.py +0 -0
- {wbtools-3.0.2 → wbtools-3.0.4}/wbtools/db/gene.py +0 -0
- {wbtools-3.0.2 → wbtools-3.0.4}/wbtools/db/generic.py +0 -0
- {wbtools-3.0.2 → wbtools-3.0.4}/wbtools/db/paper.py +0 -0
- {wbtools-3.0.2 → wbtools-3.0.4}/wbtools/db/person.py +0 -0
- {wbtools-3.0.2 → wbtools-3.0.4}/wbtools/lib/__init__.py +0 -0
- {wbtools-3.0.2 → wbtools-3.0.4}/wbtools/lib/email/__init__.py +0 -0
- {wbtools-3.0.2 → wbtools-3.0.4}/wbtools/lib/email/generic.py +0 -0
- {wbtools-3.0.2 → wbtools-3.0.4}/wbtools/lib/nlp/__init__.py +0 -0
- {wbtools-3.0.2 → wbtools-3.0.4}/wbtools/lib/nlp/common.py +0 -0
- {wbtools-3.0.2 → wbtools-3.0.4}/wbtools/lib/nlp/entity_extraction/__init__.py +0 -0
- {wbtools-3.0.2 → wbtools-3.0.4}/wbtools/lib/nlp/entity_extraction/email_addresses.py +0 -0
- {wbtools-3.0.2 → wbtools-3.0.4}/wbtools/lib/nlp/entity_extraction/ntt_extractor.py +0 -0
- {wbtools-3.0.2 → wbtools-3.0.4}/wbtools/lib/nlp/entity_extraction/variations.py +0 -0
- {wbtools-3.0.2 → wbtools-3.0.4}/wbtools/lib/nlp/literature_index/__init__.py +0 -0
- {wbtools-3.0.2 → wbtools-3.0.4}/wbtools/lib/nlp/literature_index/abstract_index.py +0 -0
- {wbtools-3.0.2 → wbtools-3.0.4}/wbtools/lib/nlp/literature_index/textpresso.py +0 -0
- {wbtools-3.0.2 → wbtools-3.0.4}/wbtools/lib/nlp/text_preprocessing.py +0 -0
- {wbtools-3.0.2 → wbtools-3.0.4}/wbtools/lib/nlp/text_similarity.py +0 -0
- {wbtools-3.0.2 → wbtools-3.0.4}/wbtools/lib/scraping.py +0 -0
- {wbtools-3.0.2 → wbtools-3.0.4}/wbtools/lib/timeout.py +0 -0
- {wbtools-3.0.2 → wbtools-3.0.4}/wbtools/literature/__init__.py +0 -0
- {wbtools-3.0.2 → wbtools-3.0.4}/wbtools/literature/corpus.py +0 -0
- {wbtools-3.0.2 → wbtools-3.0.4}/wbtools/literature/person.py +0 -0
- {wbtools-3.0.2 → wbtools-3.0.4}/wbtools/utils/__init__.py +0 -0
- {wbtools-3.0.2 → wbtools-3.0.4}/wbtools/utils/okta_utils.py +0 -0
- {wbtools-3.0.2 → wbtools-3.0.4}/wbtools.egg-info/SOURCES.txt +0 -0
- {wbtools-3.0.2 → wbtools-3.0.4}/wbtools.egg-info/dependency_links.txt +0 -0
- {wbtools-3.0.2 → wbtools-3.0.4}/wbtools.egg-info/requires.txt +0 -0
- {wbtools-3.0.2 → wbtools-3.0.4}/wbtools.egg-info/top_level.txt +0 -0
|
@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
|
|
|
5
5
|
|
|
6
6
|
setuptools.setup(
|
|
7
7
|
name="wbtools",
|
|
8
|
-
version="3.0.
|
|
8
|
+
version="3.0.4",
|
|
9
9
|
author="Valerio Arnaboldi",
|
|
10
10
|
author_email="valearna@caltech.edu",
|
|
11
11
|
description="Interface to WormBase (www.wormbase.org) curation data, including literature management and NLP "
|
|
@@ -48,11 +48,14 @@ def convert_pdf_to_txt(file_path):
|
|
|
48
48
|
input_=File(file_name=pdf_file.name, payload=fin, mime_type="application/pdf"))
|
|
49
49
|
r = process_fulltext_document.sync_detailed(client=client, multipart_data=form)
|
|
50
50
|
if r.is_success:
|
|
51
|
-
article: Article = TEI.parse(r.content, figures=
|
|
51
|
+
article: Article = TEI.parse(r.content, figures=True)
|
|
52
52
|
return [re.sub('<[^<]+>', '', sentence.text) for section in article.sections for paragraph
|
|
53
|
-
in section.paragraphs for sentence in paragraph if not (
|
|
54
|
-
|
|
55
|
-
section.paragraphs
|
|
53
|
+
in section.paragraphs for sentence in paragraph if not sentence.text.isdigit() and
|
|
54
|
+
not (
|
|
55
|
+
len(section.paragraphs) == 3 and
|
|
56
|
+
section.paragraphs[0][0].text in ['\n', ' '] and
|
|
57
|
+
section.paragraphs[-1][0].text in ['\n', ' ']
|
|
58
|
+
)]
|
|
56
59
|
else:
|
|
57
60
|
return []
|
|
58
61
|
except:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|