1.1 - 8.10 - NamedEntityFinder Example - Teradata Vantage

Teradata Vantage™ - Machine Learning Engine Analytic Function Reference

Product
Teradata Vantage
Release Number
1.1
8.10
Release Date
October 2019
Content Type
Programming Reference
Publication ID
B700-4003-079K
Language
English (United States)

Input

Input Table: assortedtext_input
id source content
1001 misc contact Alan by email at sports@espn.com for all sport info
1002 misc contact Mark at cricket@espn.com for all cricket info
1003 misc contact Roger at tennis@espn.com for all tennis info
1004 wiki The contiguous United States consists of the 48 adjoining U.S. states plus Washington, D.C., on the continent of North America
1005 wiki California's economy is centered onTechnology,Finance,real estate services, Government, and professional, Scientific and Technical business Services; together comprising 58% of the State Government economy
1006 wiki Houston is the largest city in Texas and the fourth-largest in the United States, while San Antonio is the second largest and seventh largest in the state.
1007 wiki Thomas is a photographer whose natural landscapes of the West are also a statement about the importance of the preservation of the wildness

SQL Call

SELECT * FROM NamedEntityFinder (
  ON assortedtext_input PARTITION BY ANY
  ON namefind_configure AS ConfigurationTable DIMENSION
  USING
  TextColumn ('content')
  Models ('all')
  Accumulate ('id', 'source')
) AS dt ORDER BY id;

Output

 id   source entity           entity_type  
 ---- ------ ---------------- ------------ 
 1001 misc   sports@espn.com  email       
 1002 misc   cricket@espn.com email       
 1002 misc   Mark             person      
 1003 misc   Roger            person      
 1003 misc   tennis@espn.com  email       
 1004 wiki   Washington       location    
 1004 wiki   U.S.             location    
 1004 wiki   North America    location    
 1004 wiki   United States    location    
 1005 wiki   State Government organization
 1005 wiki    58%             percentage  
 1006 wiki   San Antonio      location    
 1006 wiki   United States    location    
 1006 wiki   Texas            location    
 1007 wiki   Thomas           person

Download a zip file of all examples and a SQL script file that creates their input tables from the attachment in the left sidebar.