PyUnit-Plate 
基于规则抽取车牌号实体:包括种类、地址、数值。各种各样的车牌信息。
安装
pip install pyunit-plate
车牌种类
97式军车牌
13式武警车牌
新军车牌照
民用车牌
新能源车牌
农用车牌
使用
import pprint
from pyunit_plate import plate_number
if __name__ == '__main__':
p = plate_number('我家的车牌是贵A12345,他家的车牌是粤B12345D,我家农用车贵0688110,我家爸的车是wj粤8888X')
pprint.pprint(p)
"""
[{'address': '广东省武警消防部队', 'plate': 'WJ粤8888X', 'type': '13式武警车牌'},
{'address': '贵州省贵阳市', 'plate': '贵A12345', 'type': '民用车牌'},
{'address': '广东省深圳市', 'plate': '粤B12345D', 'type': '新能源车牌'},
{'address': '贵州省毕节', 'plate': '贵0688110', 'type': '农用车牌'}]
"""
返回参数
[
{"address": "车牌地址", "plate": "车牌号", "type" : "车牌类型"}
]
Docker部署
docker pull jtyoui/pyunit-plate
docker run -d -P pyunit-plate
车牌号规则提取
| 参数名 | 类型 | 是否可以为空 | 说明 |
|---|---|---|---|
| data | string | YES | 输入一句话 |
请求示例
Python3 Requests测试
import requests
url = "http://127.0.0.1:32768/pyunit/plate"
data = {
'data': '我家的车牌是贵A12345,他家的车牌是语粤B12345D,我家农用车贵0688110,我家爸的车是wj粤8888X',
}
headers = {'Content-Type': "application/x-www-form-urlencoded"}
response = requests.post(url, data=data, headers=headers).json()
print(response)
返回结果
{
"code": 200,
"result": [
{
"address": "广东省武警消防部队",
"plate": "WJ粤8888X",
"type": "13式武警车牌"
},
{
"address": "贵州省贵阳市",
"plate": "贵A12345",
"type": "民用车牌"
},
{
"address": "广东省深圳市",
"plate": "粤B12345D",
"type": "新能源车牌"
},
{
"address": "贵州省毕节",
"plate": "贵0688110",
"type": "农用车牌"
}
]
}
Metadata
Release files for pyunit-plate 2020.6.17
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyunit_plate-2020.6.17-py3-none-any.whl | Python 3 | none | any | Details for pyunit_plate-2020.6.17-py3-none-any.whl |
Release files / pyunit_plate-2020.6.17-py3-none-any.whl
| Download URL | pyunit_plate-2020.6.17-py3-none-any.whl |
|---|---|
| Size | 14.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f967e9deb95e2ed4e0320f76b9995b84d0f595ac74b0cec6abe52aa3ea8e5453
|
|
BLAKE2b-256 checksum How to use checksums |
2a5b2a194139d35447f87500ca2b193ecec6c41f2b6cf31540faa01254981bb9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3
|
Security for pyunit-plate 2020.6.17
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.