Edit model card

TAAS

Introduction

TAAS: A Text-based Delivery Address Analysis System in Logistics

System description

TAAS is an integrated system for text-based address analysis in logistics field. TAAS supports several address perception tasks, as well as other logistics related tasks. Our system is based on a Geography-Graph Pre-trained model in logistics, termed G2PTL, which promotes the delivery address encoding by combining the semantic learning capabilities of text pre-training with the geographical-relationship encoding abilities of graph modeling.

overview.png

Supported Tasks

  1. Address perception tasks
  • Address Completion
  • Address Standardization
  • House Info Extraction
  • Address Entity Tokenization
  • Address embedding
  1. Logistics related tasks
  • Geo-locating From Text to Geospatial
  • Pick-up Estimation Time of Arrival
  • Pick-up and Delivery Route Prediction

How To Use

Once installed, loading and using a fine-tuned model on any specific task can be done as follows:

from transformers import AutoModel
model = AutoModel.from_pretrained('Cainiao-AI/TAAS',trust_remote_code=True,ignore_mismatched_sizes=True)
model.eval()
address = ['北京市马驹桥镇兴贸二街幸福家园1幢5单元1009室 注:放在门口即可']

# Address completion
output = model.addr_complet(address)
print(output)
['北京市通州区马驹桥镇兴贸二街幸福家园1幢5单元1009室 注:放在门口即可']
# Address standardization
output = model.addr_standardize(address)
print(output)
['北京马驹桥镇兴贸二街幸福家园1幢5单元1009室']
# House info extraction
output = model.house_info(address)
print(output)
[{'楼栋': '1', '单元': '5', '门牌号': '1009'}]
# Address entity tokenization
output = model.addr_entity(address)
print(output)
[{'省': '北京', '市': '', '区': '马驹桥', '街道/镇': '镇兴贸二街', '道路': '', '道路号': '', 'poi': '幸福家园', '楼栋号': '1', '单元号': '5', '门牌号': '1009'}]
# Geo-locating from text to geospatial
output = model.geolocate(address)
's2网格化结果:453cf541fcb147b437433cf3cff43f470'
# Pick-up estimation time of arrival
output = model.pickup_ETA(eta_data)
# Users can get the address embeddings for their pick-up ETA model
# Pick-up and Delivery Route prediction
output = model.route_predict(route_data)
# Users can get the address embeddings for their route prediction model

Requirements

python>=3.8

tqdm==4.65.0
torch==1.13.1
transformers==4.27.4
datasets==2.11.0
fairseq==0.12.2
Downloads last month
7
Inference Examples
Inference API (serverless) does not yet support model repos that contain custom code.