Rozpoznávání pojmenovaných entit

Feature Engineering for NLP in Python

Rounak Banik

Data Scientist

Aplikace

  • Efektivní vyhledávací algoritmy
  • Zodpovídání otázek
  • Klasifikace zpravodajských článků
  • Zákaznický servis
Feature Engineering for NLP in Python

Rozpoznávání pojmenovaných entit

  • Identifikace a klasifikace pojmenovaných entit do předdefinovaných kategorií.
  • Kategorie zahrnují osobu, organizaci, zemi atd.
    "John Doe is a software engineer working at Google. He lives in France."
    
  • Pojmenované entity
  • John Doe → osoba
  • Google → organizace
  • France → země (geopolitická entita)
Feature Engineering for NLP in Python

NER pomocí spaCy

import spacy
string = "John Doe is a software engineer working at Google. He lives in France."

# Load model and create Doc object
nlp = spacy.load('en_core_web_sm')
doc = nlp(string)

# Generate named entities ne = [(ent.text, ent.label_) for ent in doc.ents] print(ne)
[('John Doe', 'PERSON'), ('Google', 'ORG'), ('France', 'GPE')]
Feature Engineering for NLP in Python

Anotace NER ve spaCy

Dokumentace spaCy k anotacím NER

Feature Engineering for NLP in Python

Upozornění

  • Není dokonalý
  • Výkon závisí na trénovacích a testovacích datech
  • Trénujte modely na specializovaných datech pro specifické případy
  • Jazykově závislý
Feature Engineering for NLP in Python

Pojďme cvičit!

Feature Engineering for NLP in Python

Preparing Video For Download...