caelum0x 174222bcaa feat: Builder-Track named-user tools, bio + evidence-intelligence platform, Apache-2.0
Builds PaperTrail from the base skeleton into a full evidence-verification platform
for the "Built with Claude: Life Sciences" hackathon (Builder Track).

New named-user features (Build Beyond the Bench):
- Lab Notebook Companion — rough bench notes -> structured, searchable, grounded
  experiment records (lib/labNotebook, /console/lab-notebook, migration 0059)
- Clinical Trial Matcher — de-identified patient notes -> ranked eligible
  ClinicalTrials.gov trials with per-criterion inclusion/exclusion reasoning
  (lib/trialMatcher, /console/trial-matcher, migrations 0060)

Platform:
- Deterministic verification moat (biostats recompute, exact-span grounding)
- 11 biomedical evidence engines (FAERS, GWAS, Open Targets, ChEMBL, ClinVar,
  PharmGKB, PubTator, DDI, repurposing, biomarker, unified verifier)
- Evidence Intelligence (KG, dossier, provenance/export, RWE) + enterprise
  governance (RBAC, /api/v1 gateway, metering, audit chain, retention)
- 17 OSS projects assimilated into native TypeScript on our stack (backend/engines
  retained + credited in NOTICE)
- Multi-format upload (PDF/DOCX/XLSX/CSV/MD/TXT), logo, marketing site
- Next.js 16 upgrade, benchmark harness (honest smoke-test caveat)

Licensing: Apache-2.0 (LICENSE + NOTICE).
2026-07-10 16:23:13 +03:00

55 lines
4.5 KiB
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import pytest
TEST_CASES = [("using a bag-of-words model", ["using", "a", "bag-of-words", "model"]),
("activators of cAMP- and cGMP-dependent protein", ["activators", "of", "cAMP-", "and", "cGMP-dependent", "protein"]),
("phorbol 12-myristate 13-acetate, caused almost", ["phorbol", "12-myristate", "13-acetate", ",", "caused", "almost"]),
pytest.param("let C(j) denote", ["let", "C(j)", "denote"], marks=pytest.mark.xfail),
pytest.param("let (C(j)) denote", ["let", "(", "C(j)", ")", "denote"], marks=pytest.mark.xfail),
pytest.param("let C{j} denote", ["let", "C{j}", "denote"], marks=pytest.mark.xfail),
pytest.param("for the camera(s) and manipulator(s)", ["for", "the", "camera(s)", "and", "manipulator(s)"], marks=pytest.mark.xfail),
("the (TRAP)-positive genes", ["the", "(TRAP)-positive", "genes"]),
("the {TRAP}-positive genes", ["the", "{TRAP}-positive", "genes"]),
("for [Ca2+]i protein", ["for", "[Ca2+]i", "protein"]),
pytest.param("for pyrilamine[3H] protein", ["for", "pyrilamine[3H]", "protein"], marks=pytest.mark.xfail),
("this is (normal) parens", ["this", "is", "(", "normal", ")", "parens"]),
("this is [normal] brackets", ["this", "is", "[", "normal", "]", "brackets"]),
("this is {normal} braces", ["this", "is", "{", "normal", "}", "braces"]),
("in the lan-\nguage of the", ["in", "the", "language", "of", "the"]),
("in the lan-\n\nguage of the", ["in", "the", "language", "of", "the"]),
("in the lan- \nguage of the", ["in", "the", "language", "of", "the"]),
("in the lan- \n\nguage of the", ["in", "the", "language", "of", "the"]),
("a 28× 28 image", ["a", "28", "×", "28", "image"]),
("a 28×28 image", ["a", "28", "×", "28", "image"]),
("a 28 × 28 image", ["a", "28", "×", "28", "image"]),
("the neurons’ activation", ["the", "neurons", "’", "activation"]),
("the neurons' activation", ["the", "neurons", "'", "activation"]),
pytest.param("H3G 1Y6", ["H3G", "1Y6"], marks=pytest.mark.xfail),
("HFG 1Y6", ["HFG", "1Y6"]),
pytest.param("H3g 1Y6", ["H3g", "1Y6"], marks=pytest.mark.xfail),
pytest.param("h3g 1Y6", ["h3g", "1Y6"], marks=pytest.mark.xfail),
pytest.param("h36g 1Y6", ["h36g", "1Y6"], marks=pytest.mark.xfail),
("h3gh 1Y6", ["h3gh", "1Y6"]),
("h3g3 1Y6", ["h3g3", "1Y6"]),
("3g", ["3", "g"]),
("(3g)", ["(", "3", "g", ")"]),
("This can be seen in Figure 1D. Therefore", ["This", "can", "be", "seen", "in", "Figure", "1D", ".", "Therefore"]),
("This can be seen in Figure 1d. Therefore", ["This", "can", "be", "seen", "in", "Figure", "1d", ".", "Therefore"]),
("This is a sentence.", ["This", "is", "a", "sentence", "."]),
("result of 1.345 is good", ["result", "of", "1.345", "is", "good"]),
("This sentence ends with a single 1.", ["This", "sentence", "ends", "with", "a", "single", "1", "."]),
("This sentence ends with a single 1. This is the next sentence.", ["This", "sentence", "ends", "with", "a", "single", "1", ".", "This", "is", "the", "next", "sentence", "."]),
("sec. secs. Sec. Secs. fig. figs. Fig. Figs. eq. eqs. Eq. Eqs. no. nos. No. Nos. al.", ["sec.", "secs.", "Sec.", "Secs.", "fig.", "figs.", "Fig.", "Figs.", "eq.", "eqs.", "Eq.", "Eqs.", "no.", "nos.", "No.", "Nos.", "al."]),
("in the Gq/G11 protein", ["in", "the", "Gq/G11", "protein"]),
("in the G1/G11 protein", ["in", "the", "G1/G11", "protein"]),
("in the G1/11 protein", ["in", "the", "G1/11", "protein"]),
("in the Gq/11 protein", ["in", "the", "Gq/11", "protein"]),
("This is a sentence.This is another.", ["This", "is", "a", "sentence", ".", "This", "is", "another", "."]),
("This number 1.456 should not be tokenized.", ["This", "number", "1.456", "should", "not", "be", "tokenized", "."]),
]
@pytest.mark.parametrize('text,expected_tokens', TEST_CASES)
def test_custom_tokenization(en_with_combined_rule_tokenizer_fixture, remove_new_lines_fixture, text, expected_tokens):
text = remove_new_lines_fixture(text)
doc = en_with_combined_rule_tokenizer_fixture(text)
tokens = [t.text for t in doc]
assert tokens == expected_tokens