Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
To install the latest stable version, you can use:
pip install --upgrade perdido
from perdido.geoparser import Geoparser
text = "J'ai rendez-vous proche de la place Bellecour, de la place des Célestins, au sud de la fontaine des Jacobins et près du pont Bonaparte."
geoparser = Geoparser()
doc = geoparser(text)
Some parameters can be set when initializing the Geoparser
object:
version
: Standard (default), Encyclopediepos_tagger
: spacy (default), stanza, and treetaggerfor token in doc:
print(f'{token.text}\tlemma: {token.lemma}\tpos: {token.pos}')
for token in doc:
print(token.iob_format())
for token in doc:
print(token.tsv_format())
print(doc.tei)
from display_xml import XML
XML(doc.tei, style='lovelace')
print(doc.geojson)
for entity in doc.named_entities:
print(f'entity: {entity.text}\ttag: {entity.tag}')
if entity.tag == 'place':
for t in entity.toponym_candidates:
print(f' latitude: {t.lat}\tlongitude: {t.lng}\tsource {t.source}')
for nested_entity in doc.nested_named_entities:
print(f'entity: {nested_entity.text}\ttag: {nested_entity.tag}')
if nested_entity.tag == 'place':
for t in nested_entity.toponym_candidates:
print(f' latitude: {t.lat}\tlongitude: {t.lng}\tsource {t.source}')
for sp_relation in doc.sp_relations:
print(f'spatial relation: {sp_relation.text}\ttag: {sp_relation.tag}')
displacy.render(doc.to_spacy_doc(), style="ent", jupyter=True)
displacy.render(doc.to_spacy_doc(), style="span", jupyter=True)
doc.get_folium_map()
doc.to_xml('filename.xml')
doc.to_geojson('filename.geojson')
doc.to_iob('filename.tsv')
doc.to_csv('filename.csv')
from perdido.geocoder import Geocoder
geocoder = Geocoder()
doc = geocoder('Lyon')
Some parameters can be set when initializing the Geocoder
object:
sources
:max_rows
:country_code
:bbox
:geocoder = Geocoder()
doc = geocoder(['Lyon', 'la place des Célestins', 'la fontaine des Jacobins'])
print(doc.geojson)
for t in doc.toponyms:
print(f'lat: {t.lat}\tlng: {t.lng}\tsource {t.source}\tsourceName {t.source_name}')
print(doc.to_geodataframe())
http://choucas.univ-pau.fr/docs#
import requests
url = 'http://choucas.univ-pau.fr/PERDIDO/api/'
service = 'geoparsing'
data = {'content': 'Je visite la ville de Lyon, Annecy et le Mont-Blanc.'}
parameters = {'api_key': 'demo'}
r = requests.post(url+service, params=parameters, json=data)
print(r.text)
Moncla, L. and Gaio, M. (2023). Perdido: Python library for geoparsing and geocoding French texts. In proceedings of the First International Workshop on Geographic Information Extraction from Texts (GeoExT'23), ECIR Conference, Dublin, Ireland.
Perdido
is an active project still under developpement.
This work was partially supported by the following projects:
FAQs
PERDIDO Geoparser python library
We found that perdido demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.