NERExtractor Example: Specify Dictionary | Teradata Vantage - NERExtractor Example: Specify Dictionary - Teradata Vantage

Machine Learning Engine Analytic Function Reference

Product
Teradata Vantage
Release Number
9.02
9.01
2.0
1.3
Published
February 2022
Language
English (United States)
Last Update
2022-02-10
dita:mapPath
rnn1580259159235.ditamap
dita:ditavalPath
ybt1582220416951.ditaval
dita:id
B700-4003
lifecycle
previous
Product Category
Teradata Vantageā„¢

Input

  • Input table: ner_sports_test2, as in NERExtractor Example: Specify Rules.
  • Dict: ner_dictionary, dictionary to use when extracting entities from text:
     type1 dict    
     ----- ------- 
     sport cricket
     email email  
     sport tennis 
     sport soccer
  • Model: ner_model.bin, output by NERTrainer Example.

SQL Call

SELECT * FROM NERExtractor (
  ON ner_sports_test2 PARTITION BY ANY
  ON ner_dictionary AS Dict DIMENSION
  USING
  TextColumn ('content')
  Accumulate ('id')
) AS dt ORDER BY id, sn;

Output

 id  sn entity  type_ner start_ner end_ner context approach 
 --- -- ------- -------- --------- ------- ------- -------- 
 528  1 email   email            1       1 email   DICT    
 529  1 email   email            1       1 email   DICT    
 529  2 cricket sport            7       7 cricket DICT    
 530  1 email   email            1       1 email   DICT    
 530  2 tennis  sport            7       7 tennis  DICT    
 598  1 SOCCER  sport            1       1 SOCCER  DICT

Download a zip file of all examples and a SQL script file that creates their input tables.