libphonenumber
18,349
Stars
0
Forks
0
Watchers
0
Open Issues
未知
许可证
C++
语言
创建时间
最近更新
项目能做什么
Google 开源的国际电话号码解析、格式化及验证库,支持 Java、C++ 和 JavaScript。
来源:基于仓库元数据
· 内容以仓库实际 README 为准
使用说明 查看原始 README 原仓库文档
中文使用说明暂未生成。下面保留原仓库 README 摘录,命令与配置均以原文为准。
原始 README 摘录(英文原文,节选前 3000 字符)
<p align="right">
<img src="https://travis-ci.org/google/libphonenumber.svg?branch=master">
</p>
# What is it?
Google's common Java, C++ and JavaScript library for parsing, formatting, and
validating international phone numbers. The Java version is optimized for
running on smartphones, and is used by the Android framework since 4.0 (Ice
Cream Sandwich).
# Quick links
* **Reporting an issue?** Want to send a pull request? See the [contribution
guidelines](CONTRIBUTING.md)
* Check the [frequently asked questions](FAQ.md)
* Fun! [Falsehoods Programmers Believe About Phone Numbers](FALSEHOODS.md)
* Look for
[`README`s](https://github.com/google/libphonenumber/find/master) in
directories relevant to the code you're interested in.
* For contributors and porters: [How to run the Java demo](run-java-demo.md)
* For porters: [How to make metadata changes](making-metadata-changes.md)
# Highlights of functionality
* Parsing, formatting, and validating phone numbers for all countries/regions
of the world.
* `getNumberType` - gets the type of the number based on the number itself;
able to distinguish Fixed-line, Mobile, Toll-free, Premium Rate, Shared
Cost, VoIP, Personal Numbers, UAN, Pager, and Voicemail (whenever feasible).
* `isNumberMatch` - gets a confidence level on whether two numbers could be
the same.
* `getExampleNumber` and `getExampleNumberForType` - provide valid example
numbers for all countries/regions, with the option of specifying which type
of example phone number is needed.
* `isPossibleNumber` - quickly guesses whether a number is a possible
phone number by using only the length information, much faster than a full
validation.
* `isValidNumber` - full validation of a phone number for a region using
length and prefix information.
* `AsYouTypeFormatter` - formats phone numbers on-the-fly when users enter
each digit.
* `findNumbers` - finds numbers in text.
* `PhoneNumberOfflineGeocoder` - provides geographical information related to
a phone number.
* `PhoneNumberToCarrierMapper` - provides carrier information related to a
phone number.
* `PhoneNumberToTimeZonesMapper` - provides timezone information related to a
phone number.
# Demo
## Java
The [Java demo](https://libphonenumber.appspot.com/) is updated with a slight
delay after the GitHub release.
Last demo update: v9.0.43.
Note: Even though the library (main branch/[maven release](https://repo1.maven.org/maven2/com/googlecode/libphonenumber/libphonenumber/8.12.56/))
is at v8.12.57, because of some deployment issues, we were unable to update the
Java demo with the new binary version. We will soon fix this. Meantime, please
use JS demo.
If this number is lower than the [latest release's version
number](https://github.com/google/libphonenumber/releases), we are between
releases and the demo may be at either version.
### Demo App
There is a demo Android App called [E.164 Formatter](j
阅读完整原文
商业机会分析 规则生成(AI 未配置)
综合评分 49.3 分。该项目在“个人可实施性”维度得 10 分,“付费可能性”维度得 40.0 分,差异化空间 70.0 分(评分依据见评分卡)。
将 libphonenumber 改造为垂直场景 SaaS
| 产品构想 | 保留核心能力,针对某一类用户(如某行业团队)做托管版,收取月费。 |
| 目标用户 | 有该需求的中小团队 / 独立站长 |
| 难度/周期 | 较高 · 2~4 周(MVP) |
| 收费模式 | 订阅制(如 ¥29~99/月) |
| 竞争风险 | 需验证付费意愿;注意许可证合规 |
| 依据 | 数据支持的判断:许可证与关键词显示存在商用与付费场景 |
面向细分需求的二次开发产品
| 产品构想 | 基于 libphonenumber 的核心能力,聚焦一个更窄的场景(如某平台、某行业)做差异化。 |
| 目标用户 | 该细分场景用户 |
| 难度/周期 | 中 · 2~6 周 |
| 收费模式 | 买断制 / 订阅制 / 广告 |
| 竞争风险 | 细分需求规模需验证 |
| 依据 | AI 推测:基于项目主题标签的判断 |
以上为规则引擎基于仓库公开数据生成的参考结论,包含推测成分,不构成投资或创业承诺;配置 AI 后可获得更深入的分析。
报告会保存到 个人中心
竞品与相似项目 GitHub Search 真实检索
| 项目 | 中文简介 | Stars | 语言 |
|---|---|---|---|
| jackocnr/intl-tel-input | 中文介绍暂未生成 For entering, formatting, and validating international telep |
8,259 | TypeScript |
| marmelroy/PhoneNumberKit | 中文介绍暂未生成 A Swift framework for parsing, formatting and validating int |
5,399 | Swift |
| giggsey/libphonenumber-for-php | 中文介绍暂未生成 PHP version of Google's phone number handling library |
5,075 | PHP |
| daviddrysdale/python-phonenumbers | 中文介绍暂未生成 Python port of Google's libphonenumber |
3,779 | Python |
| Propaganistas/Laravel-Phone | 中文介绍暂未生成 Phone number functionality for Laravel |
3,042 | PHP |
| catamphetamine/libphonenumber-js | 中文介绍暂未生成 A simpler (and smaller) rewrite of Google Android's libphone |
3,003 | JavaScript |
以上为通过 GitHub 官方 Search API 检索的相似项目,功能差异与优劣势需进一步人工确认,配置 AI 后可生成对比分析。
项目优势与风险
| 技术成熟度 | 创建于 ,最近推送 ,发布过 100 个 Release |
| 社区活跃 | Star 18,349 / Fork 0 / Issue 0(数据支持,可自行核实) |
| 许可证 | 未检测到(需人工确认) |
| 主要风险 | 上游项目方向可能变化;同赛道竞争者较多(见竞品表);热度与需求不完全等价 |
安装与使用
快速开始(以仓库 README 为准)
git clone https://github.com/google/libphonenumber.git cd libphonenumber # 请阅读仓库 README 获取确切安装步骤(依赖、配置、启动命令)
术语说明:Docker=应用容器(把程序和依赖打包运行);API Key=调用外部服务的密钥;Git Clone=把仓库代码下载到本地。常见错误:API Key 未配置 / 端口占用 / 数据库连接失败,多数项目在 README 的 Troubleshooting 章节有说明。