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.
Files changed (62) hide show
  1. {wbtools-3.0.2 → wbtools-3.0.4}/PKG-INFO +1 -1
  2. {wbtools-3.0.2 → wbtools-3.0.4}/setup.py +1 -1
  3. {wbtools-3.0.2 → wbtools-3.0.4}/wbtools/literature/paper.py +7 -4
  4. {wbtools-3.0.2 → wbtools-3.0.4}/wbtools.egg-info/PKG-INFO +1 -1
  5. {wbtools-3.0.2 → wbtools-3.0.4}/LICENSE +0 -0
  6. {wbtools-3.0.2 → wbtools-3.0.4}/README.md +0 -0
  7. {wbtools-3.0.2 → wbtools-3.0.4}/setup.cfg +0 -0
  8. {wbtools-3.0.2 → wbtools-3.0.4}/tests/__init__.py +0 -0
  9. {wbtools-3.0.2 → wbtools-3.0.4}/tests/config_reader.py +0 -0
  10. {wbtools-3.0.2 → wbtools-3.0.4}/tests/db/__init__.py +0 -0
  11. {wbtools-3.0.2 → wbtools-3.0.4}/tests/db/test_afp.py +0 -0
  12. {wbtools-3.0.2 → wbtools-3.0.4}/tests/db/test_antibody.py +0 -0
  13. {wbtools-3.0.2 → wbtools-3.0.4}/tests/db/test_expression.py +0 -0
  14. {wbtools-3.0.2 → wbtools-3.0.4}/tests/db/test_generic.py +0 -0
  15. {wbtools-3.0.2 → wbtools-3.0.4}/tests/lib/__init__.py +0 -0
  16. {wbtools-3.0.2 → wbtools-3.0.4}/tests/lib/entity_extraction/__init__.py +0 -0
  17. {wbtools-3.0.2 → wbtools-3.0.4}/tests/lib/entity_extraction/test_email_addresses.py +0 -0
  18. {wbtools-3.0.2 → wbtools-3.0.4}/tests/lib/entity_extraction/test_generic.py +0 -0
  19. {wbtools-3.0.2 → wbtools-3.0.4}/tests/lib/entity_extraction/test_new_variations.py +0 -0
  20. {wbtools-3.0.2 → wbtools-3.0.4}/tests/lib/test_literature_index.py +0 -0
  21. {wbtools-3.0.2 → wbtools-3.0.4}/tests/lib/test_scraping.py +0 -0
  22. {wbtools-3.0.2 → wbtools-3.0.4}/tests/lib/test_text_preprocessing.py +0 -0
  23. {wbtools-3.0.2 → wbtools-3.0.4}/tests/lib/test_text_similarity.py +0 -0
  24. {wbtools-3.0.2 → wbtools-3.0.4}/tests/literature/__init__.py +0 -0
  25. {wbtools-3.0.2 → wbtools-3.0.4}/tests/literature/test_corpus.py +0 -0
  26. {wbtools-3.0.2 → wbtools-3.0.4}/tests/literature/test_paper.py +0 -0
  27. {wbtools-3.0.2 → wbtools-3.0.4}/wbtools/__init__.py +0 -0
  28. {wbtools-3.0.2 → wbtools-3.0.4}/wbtools/db/__init__.py +0 -0
  29. {wbtools-3.0.2 → wbtools-3.0.4}/wbtools/db/abstract_manager.py +0 -0
  30. {wbtools-3.0.2 → wbtools-3.0.4}/wbtools/db/afp.py +0 -0
  31. {wbtools-3.0.2 → wbtools-3.0.4}/wbtools/db/antibody.py +0 -0
  32. {wbtools-3.0.2 → wbtools-3.0.4}/wbtools/db/dbmanager.py +0 -0
  33. {wbtools-3.0.2 → wbtools-3.0.4}/wbtools/db/expression.py +0 -0
  34. {wbtools-3.0.2 → wbtools-3.0.4}/wbtools/db/gene.py +0 -0
  35. {wbtools-3.0.2 → wbtools-3.0.4}/wbtools/db/generic.py +0 -0
  36. {wbtools-3.0.2 → wbtools-3.0.4}/wbtools/db/paper.py +0 -0
  37. {wbtools-3.0.2 → wbtools-3.0.4}/wbtools/db/person.py +0 -0
  38. {wbtools-3.0.2 → wbtools-3.0.4}/wbtools/lib/__init__.py +0 -0
  39. {wbtools-3.0.2 → wbtools-3.0.4}/wbtools/lib/email/__init__.py +0 -0
  40. {wbtools-3.0.2 → wbtools-3.0.4}/wbtools/lib/email/generic.py +0 -0
  41. {wbtools-3.0.2 → wbtools-3.0.4}/wbtools/lib/nlp/__init__.py +0 -0
  42. {wbtools-3.0.2 → wbtools-3.0.4}/wbtools/lib/nlp/common.py +0 -0
  43. {wbtools-3.0.2 → wbtools-3.0.4}/wbtools/lib/nlp/entity_extraction/__init__.py +0 -0
  44. {wbtools-3.0.2 → wbtools-3.0.4}/wbtools/lib/nlp/entity_extraction/email_addresses.py +0 -0
  45. {wbtools-3.0.2 → wbtools-3.0.4}/wbtools/lib/nlp/entity_extraction/ntt_extractor.py +0 -0
  46. {wbtools-3.0.2 → wbtools-3.0.4}/wbtools/lib/nlp/entity_extraction/variations.py +0 -0
  47. {wbtools-3.0.2 → wbtools-3.0.4}/wbtools/lib/nlp/literature_index/__init__.py +0 -0
  48. {wbtools-3.0.2 → wbtools-3.0.4}/wbtools/lib/nlp/literature_index/abstract_index.py +0 -0
  49. {wbtools-3.0.2 → wbtools-3.0.4}/wbtools/lib/nlp/literature_index/textpresso.py +0 -0
  50. {wbtools-3.0.2 → wbtools-3.0.4}/wbtools/lib/nlp/text_preprocessing.py +0 -0
  51. {wbtools-3.0.2 → wbtools-3.0.4}/wbtools/lib/nlp/text_similarity.py +0 -0
  52. {wbtools-3.0.2 → wbtools-3.0.4}/wbtools/lib/scraping.py +0 -0
  53. {wbtools-3.0.2 → wbtools-3.0.4}/wbtools/lib/timeout.py +0 -0
  54. {wbtools-3.0.2 → wbtools-3.0.4}/wbtools/literature/__init__.py +0 -0
  55. {wbtools-3.0.2 → wbtools-3.0.4}/wbtools/literature/corpus.py +0 -0
  56. {wbtools-3.0.2 → wbtools-3.0.4}/wbtools/literature/person.py +0 -0
  57. {wbtools-3.0.2 → wbtools-3.0.4}/wbtools/utils/__init__.py +0 -0
  58. {wbtools-3.0.2 → wbtools-3.0.4}/wbtools/utils/okta_utils.py +0 -0
  59. {wbtools-3.0.2 → wbtools-3.0.4}/wbtools.egg-info/SOURCES.txt +0 -0
  60. {wbtools-3.0.2 → wbtools-3.0.4}/wbtools.egg-info/dependency_links.txt +0 -0
  61. {wbtools-3.0.2 → wbtools-3.0.4}/wbtools.egg-info/requires.txt +0 -0
  62. {wbtools-3.0.2 → wbtools-3.0.4}/wbtools.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: wbtools
3
- Version: 3.0.2
3
+ Version: 3.0.4
4
4
  Summary: Interface to WormBase (www.wormbase.org) curation data, including literature management and NLP functions
5
5
  Home-page: https://github.com/WormBase/wbtools
6
6
  Author: Valerio Arnaboldi
@@ -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.2",
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=False)
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
- len(section.paragraphs) == 1 and len(section.paragraphs[0]) == 3 and
55
- section.paragraphs[0][0].text == '\n' and section.paragraphs[0][-1].text == '\n')]
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:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: wbtools
3
- Version: 3.0.2
3
+ Version: 3.0.4
4
4
  Summary: Interface to WormBase (www.wormbase.org) curation data, including literature management and NLP functions
5
5
  Home-page: https://github.com/WormBase/wbtools
6
6
  Author: Valerio Arnaboldi
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