SlideShare ist ein Scribd-Unternehmen logo
1 von 35
Downloaden Sie, um offline zu lesen
ACS National Meeting, Indianapolis, USA 8th September 2013
Tackling the difficult areas of
chemical entity extraction:
Misspelt chemical names and unconventional
entities
Daniel Lowe and Roger Sayle
NextMove Software
Cambridge, UK
ACS National Meeting, Indianapolis, USA 8th September 2013
Text mining is big business
2013 Bio-IT World Best Practices winner
ACS National Meeting, Indianapolis, USA 8th September 2013
Approaches to Entity recognition
• Dictionary based
• Grammar based
• Machine Learning
LeadMineLeadMine
ACS National Meeting, Indianapolis, USA 8th September 2013
Approaches to Entity recognition
• Dictionary based approaches are ideal for
relating entities to concepts but only
recognise a finite number of terms
– Will not recognise novel compound names
• Hence for chemistry, dictionary approaches
need to be used in conjunction with another
method
ACS National Meeting, Indianapolis, USA 8th September 2013
Advantages of grammars
• Don’t require annotated corpora
• Encode knowledge about the domain
• Very fast recognition
• Allow spelling correction if an entity is a near
match to one recognised by the grammar
ACS National Meeting, Indianapolis, USA 8th September 2013
Simple grammar Example
Digit1to9 : ‘1’ | ‘2’ |’4’ |’5’ |’6’ |’7’ |’8’ |’9’
Digit : Digit1to9 | ‘0’
Cid : ‘CID:’ Digit1to9 Digit*
C I D 1..9:
0..9
ACS National Meeting, Indianapolis, USA 8th September 2013
Grammar for IUPAC names
• Grammar for complete molecules: 485 rules
– trivialRing : 'aceanthren'|'aceanthrylen'|'acenaphthen'...
– ringGroup : trivialRing | hantzschWidmanRing | vonBaeyerSystem ...
• Generally aims to match a superset of the
nomenclature covered by IUPAC
• Specifically this is the superset that can be
theoretically be converted to structures
ACS National Meeting, Indianapolis, USA 8th September 2013
State machine size
0
2000000
4000000
6000000
8000000
10000000
12000000
14000000
0.82 0.84 0.86 0.88 0.9 0.92 0.94 0.96 0.98 1
Statesrequired
Recall on names from MayBridge catalogue
ACS National Meeting, Indianapolis, USA 8th September 2013
Two Level State Machines
• Breaks problems into a state machine that
keeps track of when concepts have to be
matched and a state machine that matches
each concept e.g. an acyclic group
– Avoids duplication of states to match the same
concept in slightly different contexts
– Slower as multiple concepts may be possible that
are allowed to start with the same characters
ACS National Meeting, Indianapolis, USA 8th September 2013
State machine RevisiteD
0
2000000
4000000
6000000
8000000
10000000
12000000
14000000
0.82 0.84 0.86 0.88 0.9 0.92 0.94 0.96 0.98 1
Statesrequired
Recall on names from MayBridge catalogue
ACS National Meeting, Indianapolis, USA 8th September 2013
Grammar inheritance
• Molecule grammar serves as a good starting
point for a substituent grammar or generic
chemical grammar
– Inherit rules rather than duplicate them
– Allow overriding of rules
pluralisedChemical : chemical 's'
elementaryMetalAtom : 'lanthanide'|'lanthanoid'|'transition
metal'|'transuranic element' | _elementaryMetalAtom
ACS National Meeting, Indianapolis, USA 8th September 2013
Unconventional entities #1
• Formulae:
– Sum formulae
• C20H25NO6
– Line formulae
• CH3CH2CH2Cl (complete molecule)
• CH2CH2 (linker)
• CH3CH2 (substituent)
– Salts
• MgSO4
ACS National Meeting, Indianapolis, USA 8th September 2013
Unconventional entities #2
• Peptide formulae
– Cys-Tyr-Phe-Gln-Asn-Cys-Pro-Arg-Gly-NH2
• Oligosaccharides
– α-L-Fucp-(1→4)-[β-D-Galp-(1→3)]-β-D-GlcpNAc-
(1→3)-β-D-Galp-(1→4)-D-Glc-ol
• Oligonucleotides
– 3'-AATG-5'
ACS National Meeting, Indianapolis, USA 8th September 2013
Unconventional entities #3
• Patent numbers
– U.S. Pat. No. 6,677,355
• Journal references
– (1974) J. Biol. Chem. 249, 4250-4256
• CAS numbers
– 90-13-1
• InChI and SMILES
ACS National Meeting, Indianapolis, USA 8th September 2013
navigating
ACS National Meeting, Indianapolis, USA 8th September 2013
Fast spelling correction
• Historically we have used Levenshtein-like distance measures
(all possible corrections)
• Only use spelling correction when recognition fails
• Allow a certain level of “look behind”
– 13 characters empirically found to yield identical results
– Speeds up spelling correction ~80%
• Dictionary of common English words can be used to prevent
attempting spelling correction
ACS National Meeting, Indianapolis, USA 8th September 2013
Words Ignored for spelling
correction (gray)
ACS National Meeting, Indianapolis, USA 8th September 2013
Exceptions to local errors
• Whether a space is allowed may only be
decidable once the suffix of a chemical name
is encountered
propyl bromochloromethanol 
propylbromochloromethanol
propyl bromochloromethanoate
19 character look behind required!
ACS National Meeting, Indianapolis, USA 8th September 2013
BioCreative IV
• CHEMDNER (Chemical compound and drug
name recognition task)
• 10000 annotated PubMed abstracts (3500 for
training, 3500 for development and 3000 for
testing)
• Deadline for submission: This Thursday
ACS National Meeting, Indianapolis, USA 8th September 2013
Typical annotated Abstract
ACS National Meeting, Indianapolis, USA 8th September 2013
Dictionaries… bigger is better
• For high recall of trivial names dictionaries
with high coverage are required.
• The largest publically available dictionary is
PubChem with over 94 million terms
• However most of these terms are either not
useful or actually detrimental to text mining
ACS National Meeting, Indianapolis, USA 8th September 2013
Aggressive filtering
• “what you don't see won't hurt you”
• Hence remove terms are also English words or start with an
English word
– Accomplished using a large English dictionary with
chemistry terms removed
• Remove internal identifiers used by depositors
• Remove terms that are matched by our grammars
• Ultimate result: 94 million less than 3 million
ACS National Meeting, Indianapolis, USA 8th September 2013
Structure Aware filtering
• “Do not tag proteins, polypeptides (> 15aa),
nucleic acid polymers, polysaccharides,
oligosaccharides [tetrasaccharide or longer] and other
biochemicals.”
• About 40,000 polypeptides and
oligosaccharides excluded from PubChem
using these criteria
ACS National Meeting, Indianapolis, USA 8th September 2013
Entity Extension
• Even PubChem is far from comprehensive hence it can be
useful to extend the start and/or end of entities to avoid
partial hits
– α-santalol can be recognised from santalol in the
dictionary
• Extension is bracketing aware and blocked by English words
• Entity trimming also performed to comply with the
annotation guidelines
– ‘Allura Red AC dye’  ‘Allura Red AC’
ACS National Meeting, Indianapolis, USA 8th September 2013
Entity Merging
• Adjacent entities may actually be the same
entities
– Ethyl ester one entity
– (+)-limonene epoxide  one entity
BUT
– Hexane-benzene two entities
ACS National Meeting, Indianapolis, USA 8th September 2013
Using an ontology to determine
when terms add information
• Genistein isoflavone  two entities
• Glycine ester  one entity
Genistein showing isoflavone core structure
ACS National Meeting, Indianapolis, USA 8th September 2013
Abbreviation detection
• Based on the Hearst and Schwartz algorithm
• Detects abbreviations of the following forms:
– Tetrahydrofuran (THF)
– THF (tetrahydrofuran)
– Tetrahydrofuran (THF;
– (tetrahydrofuran, THF)
– THF = tetrahydrofuran
Schwartz, A.; Hearst, M. Proceedings of the Pacific Symposium on
Biocomputing 2003.
ACS National Meeting, Indianapolis, USA 8th September 2013
AnTI-Abbreviation detection
• Finds entities detected as abbreviations of
unrecognised entities
– Can mean a common chemical abbreviation has
been redefined in the scope of the document
current good manufacturing practice (cGMP)
cGMP = Cyclic guanosine monophosphate =
ACS National Meeting, Indianapolis, USA 8th September 2013
Grammars used
• Systematic molecule
• Systematic prefix
• Systematic generic name
• Registry number
• CAS number
• Chemical formulae
• Systematic polymer
• Semi systematic chemical name
– Systematic prefix + common trivial name/name from PubChem
ACS National Meeting, Indianapolis, USA 8th September 2013
Dictionaries used
• Noise words e.g. lead
• Trivial polymer
• Generic chemical terms (some from ChEBI)
• Common abbreviations
• Common trivial names
• Filtered PubChem
• Alloys
• Allotropes
• Minerals
ACS National Meeting, Indianapolis, USA 8th September 2013
Making the most of the knowledge
provided
• Use training data to identify terms that are
not currently recognised (a whitelist)
• Identify terms that are often false positives (a
blacklist)
• Each false positive and false negative is placed
into such a list if its inclusion increased F-score
(harmonic mean of precision/recall)
ACS National Meeting, Indianapolis, USA 8th September 2013
Results
(on development set)
Configuration Precision Recall F-score
Baseline 0.87 0.82 0.84
WhiteList 0.86 0.85 0.85
BlackList 0.88 0.80 0.84
WhiteList +
BlackList
0.87 0.83 0.85
ACS National Meeting, Indianapolis, USA 8th September 2013
Future work
• Typically we are focused on generating
structures from the entities we recognise
– Line formula parsing
– Generic chemical name parsing (difficult to do in a
way that the results are not tied to a particular
toolkit)
• Grammars serve as an excellent starting
point for writing parsers
ACS National Meeting, Indianapolis, USA 8th September 2013
Conclusions
• Two level state machines allow many complicated
grammars to be represented by far fewer states
• Back tracking spelling correction can provide significant
speed improvements without effecting recall
• Check out our blog (nextmovesoftware.co.uk/blog) in a
couple of weeks to find out how we did in BioCreative!
ACS National Meeting, Indianapolis, USA 8th September 2013
daniel@nextmovesoftware.com
Tackling the difficult areas of chemical entity
extraction:
Misspelt chemical names and unconventional entities
Thank you for your attention

Weitere ähnliche Inhalte

Ähnlich wie Tackling the difficult areas of chemical entity extraction: Misspelt chemical names and unconventional entities

ICIC 2013 New Product Introductions CAS
ICIC 2013 New Product Introductions CASICIC 2013 New Product Introductions CAS
ICIC 2013 New Product Introductions CAS
Dr. Haxel Consult
 
Serving the medicinal chemistry community with Royal Society of Chemistry che...
Serving the medicinal chemistry community with Royal Society of Chemistry che...Serving the medicinal chemistry community with Royal Society of Chemistry che...
Serving the medicinal chemistry community with Royal Society of Chemistry che...
US Environmental Protection Agency (EPA), Center for Computational Toxicology and Exposure
 
Crowdsourcing, Collaborations And Text Mining In A World Of Open Chemistry
Crowdsourcing, Collaborations And Text Mining In A World Of Open ChemistryCrowdsourcing, Collaborations And Text Mining In A World Of Open Chemistry
Crowdsourcing, Collaborations And Text Mining In A World Of Open Chemistry
US Environmental Protection Agency (EPA), Center for Computational Toxicology and Exposure
 
ChemSpider as a Foundation for Crowdsourcing and Collaborations in Open Chemi...
ChemSpider as a Foundation for Crowdsourcing and Collaborations in Open Chemi...ChemSpider as a Foundation for Crowdsourcing and Collaborations in Open Chemi...
ChemSpider as a Foundation for Crowdsourcing and Collaborations in Open Chemi...
US Environmental Protection Agency (EPA), Center for Computational Toxicology and Exposure
 
IC-SDV 2019: Elsevier
IC-SDV 2019: ElsevierIC-SDV 2019: Elsevier
IC-SDV 2019: Elsevier
Dr. Haxel Consult
 
RSC ChemSpider -- Managing and Integrating Chemistry on the Internet to Build...
RSC ChemSpider -- Managing and Integrating Chemistry on the Internet to Build...RSC ChemSpider -- Managing and Integrating Chemistry on the Internet to Build...
RSC ChemSpider -- Managing and Integrating Chemistry on the Internet to Build...
US Environmental Protection Agency (EPA), Center for Computational Toxicology and Exposure
 
Search Terms And Strategies
Search Terms And StrategiesSearch Terms And Strategies
Search Terms And Strategies
kjurecki
 

Ähnlich wie Tackling the difficult areas of chemical entity extraction: Misspelt chemical names and unconventional entities (20)

ICIC 2013 New Product Introductions CAS
ICIC 2013 New Product Introductions CASICIC 2013 New Product Introductions CAS
ICIC 2013 New Product Introductions CAS
 
Serving the medicinal chemistry community with Royal Society of Chemistry che...
Serving the medicinal chemistry community with Royal Society of Chemistry che...Serving the medicinal chemistry community with Royal Society of Chemistry che...
Serving the medicinal chemistry community with Royal Society of Chemistry che...
 
Crowdsourcing, Collaborations And Text Mining In A World Of Open Chemistry
Crowdsourcing, Collaborations And Text Mining In A World Of Open ChemistryCrowdsourcing, Collaborations And Text Mining In A World Of Open Chemistry
Crowdsourcing, Collaborations And Text Mining In A World Of Open Chemistry
 
Automatic extraction of bioactivity data from patents
Automatic extraction of bioactivity data from patentsAutomatic extraction of bioactivity data from patents
Automatic extraction of bioactivity data from patents
 
Searching for evidence - Paramedicine
Searching for evidence - ParamedicineSearching for evidence - Paramedicine
Searching for evidence - Paramedicine
 
Information retrieval guide
Information retrieval guideInformation retrieval guide
Information retrieval guide
 
ChemSpider as a Foundation for Crowdsourcing and Collaborations in Open Chemi...
ChemSpider as a Foundation for Crowdsourcing and Collaborations in Open Chemi...ChemSpider as a Foundation for Crowdsourcing and Collaborations in Open Chemi...
ChemSpider as a Foundation for Crowdsourcing and Collaborations in Open Chemi...
 
Pharmacy libguide slideshare
Pharmacy libguide slidesharePharmacy libguide slideshare
Pharmacy libguide slideshare
 
Paramedicine slide share
Paramedicine slide shareParamedicine slide share
Paramedicine slide share
 
Taming The Wild West Of Internet Based Chemistry You Can Help
Taming The Wild West Of Internet Based Chemistry You Can HelpTaming The Wild West Of Internet Based Chemistry You Can Help
Taming The Wild West Of Internet Based Chemistry You Can Help
 
The impact of domain-specific stop-word lists on ecommerce website search per...
The impact of domain-specific stop-word lists on ecommerce website search per...The impact of domain-specific stop-word lists on ecommerce website search per...
The impact of domain-specific stop-word lists on ecommerce website search per...
 
CAS: Transforming Discovery
CAS: Transforming DiscoveryCAS: Transforming Discovery
CAS: Transforming Discovery
 
IC-SDV 2019: Elsevier
IC-SDV 2019: ElsevierIC-SDV 2019: Elsevier
IC-SDV 2019: Elsevier
 
Using Text-Mining and Crowdsourced Curation to Build a Structure Centric Comm...
Using Text-Mining and Crowdsourced Curation to Build a Structure Centric Comm...Using Text-Mining and Crowdsourced Curation to Build a Structure Centric Comm...
Using Text-Mining and Crowdsourced Curation to Build a Structure Centric Comm...
 
RSC ChemSpider -- Managing and Integrating Chemistry on the Internet to Build...
RSC ChemSpider -- Managing and Integrating Chemistry on the Internet to Build...RSC ChemSpider -- Managing and Integrating Chemistry on the Internet to Build...
RSC ChemSpider -- Managing and Integrating Chemistry on the Internet to Build...
 
Enabling Exploration Through Text Analytics
Enabling Exploration Through Text AnalyticsEnabling Exploration Through Text Analytics
Enabling Exploration Through Text Analytics
 
Chemical Text Mining for Current Awareness of Pharmaceutical Patents
Chemical Text Mining for Current Awareness of Pharmaceutical PatentsChemical Text Mining for Current Awareness of Pharmaceutical Patents
Chemical Text Mining for Current Awareness of Pharmaceutical Patents
 
Advanced grammars for state-of-the-art named entity recognition (NER)
Advanced grammars for state-of-the-art named entity recognition (NER)Advanced grammars for state-of-the-art named entity recognition (NER)
Advanced grammars for state-of-the-art named entity recognition (NER)
 
Search Terms And Strategies
Search Terms And StrategiesSearch Terms And Strategies
Search Terms And Strategies
 
BioSamples Database Linked Data, SWAT4LS Tutorial
BioSamples Database Linked Data, SWAT4LS TutorialBioSamples Database Linked Data, SWAT4LS Tutorial
BioSamples Database Linked Data, SWAT4LS Tutorial
 

Kürzlich hochgeladen

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Kürzlich hochgeladen (20)

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 

Tackling the difficult areas of chemical entity extraction: Misspelt chemical names and unconventional entities

  • 1. ACS National Meeting, Indianapolis, USA 8th September 2013 Tackling the difficult areas of chemical entity extraction: Misspelt chemical names and unconventional entities Daniel Lowe and Roger Sayle NextMove Software Cambridge, UK
  • 2. ACS National Meeting, Indianapolis, USA 8th September 2013 Text mining is big business 2013 Bio-IT World Best Practices winner
  • 3. ACS National Meeting, Indianapolis, USA 8th September 2013 Approaches to Entity recognition • Dictionary based • Grammar based • Machine Learning LeadMineLeadMine
  • 4. ACS National Meeting, Indianapolis, USA 8th September 2013 Approaches to Entity recognition • Dictionary based approaches are ideal for relating entities to concepts but only recognise a finite number of terms – Will not recognise novel compound names • Hence for chemistry, dictionary approaches need to be used in conjunction with another method
  • 5. ACS National Meeting, Indianapolis, USA 8th September 2013 Advantages of grammars • Don’t require annotated corpora • Encode knowledge about the domain • Very fast recognition • Allow spelling correction if an entity is a near match to one recognised by the grammar
  • 6. ACS National Meeting, Indianapolis, USA 8th September 2013 Simple grammar Example Digit1to9 : ‘1’ | ‘2’ |’4’ |’5’ |’6’ |’7’ |’8’ |’9’ Digit : Digit1to9 | ‘0’ Cid : ‘CID:’ Digit1to9 Digit* C I D 1..9: 0..9
  • 7. ACS National Meeting, Indianapolis, USA 8th September 2013 Grammar for IUPAC names • Grammar for complete molecules: 485 rules – trivialRing : 'aceanthren'|'aceanthrylen'|'acenaphthen'... – ringGroup : trivialRing | hantzschWidmanRing | vonBaeyerSystem ... • Generally aims to match a superset of the nomenclature covered by IUPAC • Specifically this is the superset that can be theoretically be converted to structures
  • 8. ACS National Meeting, Indianapolis, USA 8th September 2013 State machine size 0 2000000 4000000 6000000 8000000 10000000 12000000 14000000 0.82 0.84 0.86 0.88 0.9 0.92 0.94 0.96 0.98 1 Statesrequired Recall on names from MayBridge catalogue
  • 9. ACS National Meeting, Indianapolis, USA 8th September 2013 Two Level State Machines • Breaks problems into a state machine that keeps track of when concepts have to be matched and a state machine that matches each concept e.g. an acyclic group – Avoids duplication of states to match the same concept in slightly different contexts – Slower as multiple concepts may be possible that are allowed to start with the same characters
  • 10. ACS National Meeting, Indianapolis, USA 8th September 2013 State machine RevisiteD 0 2000000 4000000 6000000 8000000 10000000 12000000 14000000 0.82 0.84 0.86 0.88 0.9 0.92 0.94 0.96 0.98 1 Statesrequired Recall on names from MayBridge catalogue
  • 11. ACS National Meeting, Indianapolis, USA 8th September 2013 Grammar inheritance • Molecule grammar serves as a good starting point for a substituent grammar or generic chemical grammar – Inherit rules rather than duplicate them – Allow overriding of rules pluralisedChemical : chemical 's' elementaryMetalAtom : 'lanthanide'|'lanthanoid'|'transition metal'|'transuranic element' | _elementaryMetalAtom
  • 12. ACS National Meeting, Indianapolis, USA 8th September 2013 Unconventional entities #1 • Formulae: – Sum formulae • C20H25NO6 – Line formulae • CH3CH2CH2Cl (complete molecule) • CH2CH2 (linker) • CH3CH2 (substituent) – Salts • MgSO4
  • 13. ACS National Meeting, Indianapolis, USA 8th September 2013 Unconventional entities #2 • Peptide formulae – Cys-Tyr-Phe-Gln-Asn-Cys-Pro-Arg-Gly-NH2 • Oligosaccharides – α-L-Fucp-(1→4)-[β-D-Galp-(1→3)]-β-D-GlcpNAc- (1→3)-β-D-Galp-(1→4)-D-Glc-ol • Oligonucleotides – 3'-AATG-5'
  • 14. ACS National Meeting, Indianapolis, USA 8th September 2013 Unconventional entities #3 • Patent numbers – U.S. Pat. No. 6,677,355 • Journal references – (1974) J. Biol. Chem. 249, 4250-4256 • CAS numbers – 90-13-1 • InChI and SMILES
  • 15. ACS National Meeting, Indianapolis, USA 8th September 2013 navigating
  • 16. ACS National Meeting, Indianapolis, USA 8th September 2013 Fast spelling correction • Historically we have used Levenshtein-like distance measures (all possible corrections) • Only use spelling correction when recognition fails • Allow a certain level of “look behind” – 13 characters empirically found to yield identical results – Speeds up spelling correction ~80% • Dictionary of common English words can be used to prevent attempting spelling correction
  • 17. ACS National Meeting, Indianapolis, USA 8th September 2013 Words Ignored for spelling correction (gray)
  • 18. ACS National Meeting, Indianapolis, USA 8th September 2013 Exceptions to local errors • Whether a space is allowed may only be decidable once the suffix of a chemical name is encountered propyl bromochloromethanol  propylbromochloromethanol propyl bromochloromethanoate 19 character look behind required!
  • 19. ACS National Meeting, Indianapolis, USA 8th September 2013 BioCreative IV • CHEMDNER (Chemical compound and drug name recognition task) • 10000 annotated PubMed abstracts (3500 for training, 3500 for development and 3000 for testing) • Deadline for submission: This Thursday
  • 20. ACS National Meeting, Indianapolis, USA 8th September 2013 Typical annotated Abstract
  • 21. ACS National Meeting, Indianapolis, USA 8th September 2013 Dictionaries… bigger is better • For high recall of trivial names dictionaries with high coverage are required. • The largest publically available dictionary is PubChem with over 94 million terms • However most of these terms are either not useful or actually detrimental to text mining
  • 22. ACS National Meeting, Indianapolis, USA 8th September 2013 Aggressive filtering • “what you don't see won't hurt you” • Hence remove terms are also English words or start with an English word – Accomplished using a large English dictionary with chemistry terms removed • Remove internal identifiers used by depositors • Remove terms that are matched by our grammars • Ultimate result: 94 million less than 3 million
  • 23. ACS National Meeting, Indianapolis, USA 8th September 2013 Structure Aware filtering • “Do not tag proteins, polypeptides (> 15aa), nucleic acid polymers, polysaccharides, oligosaccharides [tetrasaccharide or longer] and other biochemicals.” • About 40,000 polypeptides and oligosaccharides excluded from PubChem using these criteria
  • 24. ACS National Meeting, Indianapolis, USA 8th September 2013 Entity Extension • Even PubChem is far from comprehensive hence it can be useful to extend the start and/or end of entities to avoid partial hits – α-santalol can be recognised from santalol in the dictionary • Extension is bracketing aware and blocked by English words • Entity trimming also performed to comply with the annotation guidelines – ‘Allura Red AC dye’  ‘Allura Red AC’
  • 25. ACS National Meeting, Indianapolis, USA 8th September 2013 Entity Merging • Adjacent entities may actually be the same entities – Ethyl ester one entity – (+)-limonene epoxide  one entity BUT – Hexane-benzene two entities
  • 26. ACS National Meeting, Indianapolis, USA 8th September 2013 Using an ontology to determine when terms add information • Genistein isoflavone  two entities • Glycine ester  one entity Genistein showing isoflavone core structure
  • 27. ACS National Meeting, Indianapolis, USA 8th September 2013 Abbreviation detection • Based on the Hearst and Schwartz algorithm • Detects abbreviations of the following forms: – Tetrahydrofuran (THF) – THF (tetrahydrofuran) – Tetrahydrofuran (THF; – (tetrahydrofuran, THF) – THF = tetrahydrofuran Schwartz, A.; Hearst, M. Proceedings of the Pacific Symposium on Biocomputing 2003.
  • 28. ACS National Meeting, Indianapolis, USA 8th September 2013 AnTI-Abbreviation detection • Finds entities detected as abbreviations of unrecognised entities – Can mean a common chemical abbreviation has been redefined in the scope of the document current good manufacturing practice (cGMP) cGMP = Cyclic guanosine monophosphate =
  • 29. ACS National Meeting, Indianapolis, USA 8th September 2013 Grammars used • Systematic molecule • Systematic prefix • Systematic generic name • Registry number • CAS number • Chemical formulae • Systematic polymer • Semi systematic chemical name – Systematic prefix + common trivial name/name from PubChem
  • 30. ACS National Meeting, Indianapolis, USA 8th September 2013 Dictionaries used • Noise words e.g. lead • Trivial polymer • Generic chemical terms (some from ChEBI) • Common abbreviations • Common trivial names • Filtered PubChem • Alloys • Allotropes • Minerals
  • 31. ACS National Meeting, Indianapolis, USA 8th September 2013 Making the most of the knowledge provided • Use training data to identify terms that are not currently recognised (a whitelist) • Identify terms that are often false positives (a blacklist) • Each false positive and false negative is placed into such a list if its inclusion increased F-score (harmonic mean of precision/recall)
  • 32. ACS National Meeting, Indianapolis, USA 8th September 2013 Results (on development set) Configuration Precision Recall F-score Baseline 0.87 0.82 0.84 WhiteList 0.86 0.85 0.85 BlackList 0.88 0.80 0.84 WhiteList + BlackList 0.87 0.83 0.85
  • 33. ACS National Meeting, Indianapolis, USA 8th September 2013 Future work • Typically we are focused on generating structures from the entities we recognise – Line formula parsing – Generic chemical name parsing (difficult to do in a way that the results are not tied to a particular toolkit) • Grammars serve as an excellent starting point for writing parsers
  • 34. ACS National Meeting, Indianapolis, USA 8th September 2013 Conclusions • Two level state machines allow many complicated grammars to be represented by far fewer states • Back tracking spelling correction can provide significant speed improvements without effecting recall • Check out our blog (nextmovesoftware.co.uk/blog) in a couple of weeks to find out how we did in BioCreative!
  • 35. ACS National Meeting, Indianapolis, USA 8th September 2013 daniel@nextmovesoftware.com Tackling the difficult areas of chemical entity extraction: Misspelt chemical names and unconventional entities Thank you for your attention