use strict; use warnings; use Data::Dumper; use Lingua::EN::NamedEntity; my @entities = extract_entities("El Nino is the warm phase of the El Niņo Southern Oscillation (commonly called ENSO) and is associated with a band of warm ocean water that develops in the central and east-central equatorial"); print Dumper (@entities); Output $ perl entity.pl $VAR1 = { 'count' => 1, 'scores' => { 'person' => 4, 'place' => 1, 'organisation' => 3 }, 'entity' => 'El Ni', 'class' => 'person' }; $VAR2 = { 'count' => 1, 'scores' => { 'organisation' => 2, 'person' => 9, 'place' => 1 }, 'entity' => 'El Nino', 'class' => 'person' }; $VAR3 = { 'class' => 'person', 'entity' => 'Southern Oscillation', 'scores' => { 'organisation' => 2, 'place' => 1, 'person' => 4 }, 'count' => 1 };