structflo-ner 0.7.0__tar.gz → 0.7.1__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 (44) hide show
  1. {structflo_ner-0.7.0 → structflo_ner-0.7.1}/PKG-INFO +1 -1
  2. {structflo_ner-0.7.0 → structflo_ner-0.7.1}/structflo/ner/__init__.py +1 -1
  3. {structflo_ner-0.7.0 → structflo_ner-0.7.1}/structflo/ner/_examples.py +6 -1
  4. {structflo_ner-0.7.0 → structflo_ner-0.7.1}/structflo/ner/_prompts.py +13 -6
  5. {structflo_ner-0.7.0 → structflo_ner-0.7.1}/.github/workflows/ci.yml +0 -0
  6. {structflo_ner-0.7.0 → structflo_ner-0.7.1}/.github/workflows/publish.yml +0 -0
  7. {structflo_ner-0.7.0 → structflo_ner-0.7.1}/.gitignore +0 -0
  8. {structflo_ner-0.7.0 → structflo_ner-0.7.1}/Makefile +0 -0
  9. {structflo_ner-0.7.0 → structflo_ner-0.7.1}/README.md +0 -0
  10. {structflo_ner-0.7.0 → structflo_ner-0.7.1}/coverage.xml +0 -0
  11. {structflo_ner-0.7.0 → structflo_ner-0.7.1}/images/fast-viz.png +0 -0
  12. {structflo_ner-0.7.0 → structflo_ner-0.7.1}/images/local-gen-pandas.png +0 -0
  13. {structflo_ner-0.7.0 → structflo_ner-0.7.1}/images/local-gen-viz.png +0 -0
  14. {structflo_ner-0.7.0 → structflo_ner-0.7.1}/images/local-tb-viz.png +0 -0
  15. {structflo_ner-0.7.0 → structflo_ner-0.7.1}/images/ner_visualization.gif +0 -0
  16. {structflo_ner-0.7.0 → structflo_ner-0.7.1}/images/struct-flo-ner.png +0 -0
  17. {structflo_ner-0.7.0 → structflo_ner-0.7.1}/notebooks/01_quickstart.ipynb +0 -0
  18. {structflo_ner-0.7.0 → structflo_ner-0.7.1}/notebooks/02_fast_ner.ipynb +0 -0
  19. {structflo_ner-0.7.0 → structflo_ner-0.7.1}/pyproject.toml +0 -0
  20. {structflo_ner-0.7.0 → structflo_ner-0.7.1}/structflo/ner/_display.py +0 -0
  21. {structflo_ner-0.7.0 → structflo_ner-0.7.1}/structflo/ner/_entities.py +0 -0
  22. {structflo_ner-0.7.0 → structflo_ner-0.7.1}/structflo/ner/_mapping.py +0 -0
  23. {structflo_ner-0.7.0 → structflo_ner-0.7.1}/structflo/ner/extractor.py +0 -0
  24. {structflo_ner-0.7.0 → structflo_ner-0.7.1}/structflo/ner/fast/README.md +0 -0
  25. {structflo_ner-0.7.0 → structflo_ner-0.7.1}/structflo/ner/fast/__init__.py +0 -0
  26. {structflo_ner-0.7.0 → structflo_ner-0.7.1}/structflo/ner/fast/_loader.py +0 -0
  27. {structflo_ner-0.7.0 → structflo_ner-0.7.1}/structflo/ner/fast/_matcher.py +0 -0
  28. {structflo_ner-0.7.0 → structflo_ner-0.7.1}/structflo/ner/fast/_normalize.py +0 -0
  29. {structflo_ner-0.7.0 → structflo_ner-0.7.1}/structflo/ner/fast/extractor.py +0 -0
  30. {structflo_ner-0.7.0 → structflo_ner-0.7.1}/structflo/ner/fast/gazetteers/accession_number.yml +0 -0
  31. {structflo_ner-0.7.0 → structflo_ner-0.7.1}/structflo/ner/fast/gazetteers/compound_name.yml +0 -0
  32. {structflo_ner-0.7.0 → structflo_ner-0.7.1}/structflo/ner/fast/gazetteers/disease.yml +0 -0
  33. {structflo_ner-0.7.0 → structflo_ner-0.7.1}/structflo/ner/fast/gazetteers/functional_category.yml +0 -0
  34. {structflo_ner-0.7.0 → structflo_ner-0.7.1}/structflo/ner/fast/gazetteers/gene_name.yml +0 -0
  35. {structflo_ner-0.7.0 → structflo_ner-0.7.1}/structflo/ner/fast/gazetteers/product.yml +0 -0
  36. {structflo_ner-0.7.0 → structflo_ner-0.7.1}/structflo/ner/fast/gazetteers/screening_method.yml +0 -0
  37. {structflo_ner-0.7.0 → structflo_ner-0.7.1}/structflo/ner/fast/gazetteers/strain.yml +0 -0
  38. {structflo_ner-0.7.0 → structflo_ner-0.7.1}/structflo/ner/fast/gazetteers/target.yml +0 -0
  39. {structflo_ner-0.7.0 → structflo_ner-0.7.1}/structflo/ner/profiles.py +0 -0
  40. {structflo_ner-0.7.0 → structflo_ner-0.7.1}/tests/__init__.py +0 -0
  41. {structflo_ner-0.7.0 → structflo_ner-0.7.1}/tests/test_entities.py +0 -0
  42. {structflo_ner-0.7.0 → structflo_ner-0.7.1}/tests/test_extractor.py +0 -0
  43. {structflo_ner-0.7.0 → structflo_ner-0.7.1}/tests/test_fast.py +0 -0
  44. {structflo_ner-0.7.0 → structflo_ner-0.7.1}/uv.lock +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: structflo-ner
3
- Version: 0.7.0
3
+ Version: 0.7.1
4
4
  Summary: Drug discovery NER wrapper around LangExtract — zero-config entity extraction for chemistry and biology.
5
5
  License: Apache-2.0
6
6
  Requires-Python: >=3.10
@@ -63,7 +63,7 @@ from structflo.ner.profiles import (
63
63
  EntityProfile,
64
64
  )
65
65
 
66
- __version__ = "0.7.0"
66
+ __version__ = "0.7.1"
67
67
 
68
68
  __all__ = [
69
69
  # Main classes
@@ -984,7 +984,8 @@ _TB_EXAMPLE_6 = lx.data.ExampleData(
984
984
 
985
985
  # Strain panel: organism column headers are the strain, a protein column the
986
986
  # target, a cytotoxicity column the assay; a column dosed with a second drug
987
- # names the combination partner. The disease stays a disease entity.
987
+ # names the combination partner, which is also a compound. The disease stays a
988
+ # disease entity.
988
989
  _TB_EXAMPLE_7 = lx.data.ExampleData(
989
990
  text=(
990
991
  "Table 3. Antibacterial activity against hospital-acquired pneumonia isolates\n\n"
@@ -1005,6 +1006,10 @@ _TB_EXAMPLE_7 = lx.data.ExampleData(
1005
1006
  extraction_text="CHEMBL5311027",
1006
1007
  attributes={"synonyms": "9c"},
1007
1008
  ),
1009
+ lx.data.Extraction(
1010
+ extraction_class="compound_name",
1011
+ extraction_text="polymyxin B",
1012
+ ),
1008
1013
  lx.data.Extraction(
1009
1014
  extraction_class="bioactivity",
1010
1015
  extraction_text="0.25",
@@ -32,13 +32,16 @@ _TB_SLOT_ATTRIBUTES = (
32
32
  "stated.\n"
33
33
  "- target: the protein the value was measured against: an enzyme, receptor, channel or "
34
34
  "other molecular target, as written ('InhA', 'DprE1', 'hERG', 'KasA', 'PDE4B', "
35
- "'BACE1'). null for whole-cell, organism and cytotoxicity values unless one is named.\n"
35
+ "'BACE1'), also when it heads a table column. null for whole-cell, organism and "
36
+ "cytotoxicity values unless one is named.\n"
36
37
  "- strain: the organism the value was measured against, as written: species, strain, "
37
38
  "isolate or virus (H37Rv, M. tuberculosis, E. coli ATCC 25922, A. baumannii ATCC 19606, "
38
- "Pf3D7, Dd2, S. mansoni, HIV-1, norovirus). An organism always goes here, never in assay or target, even "
39
- "when it heads a table column or is all that names the assay. null when not stated.\n"
39
+ "Pf3D7, Dd2, S. mansoni, HIV-1, norovirus). An organism always goes here, never in assay "
40
+ "or target, even when it heads a table column or is all that names the assay. null when "
41
+ "not stated.\n"
40
42
  "- combination: a second compound dosed together with the one measured (a combination "
41
- "or potentiation partner), as written ('avibactam', 'polymyxin B 0.5 µg/mL'). Not a "
43
+ "or potentiation partner), as written ('avibactam', 'polymyxin B 0.5 µg/mL'), also when "
44
+ "a table column is headed by the partner's name alone. Not a "
42
45
  "reference compound the value is relative to ('% of isoproterenol') or an agonist, substrate "
43
46
  "or tracer the assay uses. null for a single agent.\n"
44
47
  )
@@ -46,8 +49,10 @@ _BIOACTIVITY_TABLES = (
46
49
  "In a data table, extract every cell value as its own bioactivity. An ID or registry "
47
50
  "column, when present, supplies the compound_name and the row label is only its synonym; "
48
51
  "otherwise the row label is the compound_name. A column header fills the attribute for "
49
- "what it names (an assay or cell line, a protein target, an organism or strain), and the "
50
- "endpoint and unit often come from the caption or a footnote ('CC50 in µM')."
52
+ "what it names (an assay or cell line, a protein target, an organism or strain, a partner "
53
+ "drug dosed alongside); a header you cannot place goes in assay, so no table value is left "
54
+ "without its column. The endpoint and unit often come from the caption or a footnote "
55
+ "('CC50 in µM')."
51
56
  )
52
57
 
53
58
  CHEMISTRY_PROMPT = (
@@ -129,6 +134,8 @@ TB_PROMPT = (
129
134
  "- A disease or infection is a disease entity wherever it is named, in prose, a heading "
130
135
  "or a table cell (tuberculosis, HIV infection, malaria, schistosomiasis, glioblastoma in 'U87 (glioblastoma)'), "
131
136
  "even when its organism also fills a bioactivity's strain.\n"
137
+ "- A combination partner is also a compound_name entity, extracted once like any other "
138
+ "compound.\n"
132
139
  "- Use target for proteins in a drug-targeting context, gene_name for loci, "
133
140
  "protein_name for non-drug-target proteins.\n\n"
134
141
  "Extract only what is explicitly stated; do not infer or generate values."
File without changes
File without changes
File without changes
File without changes