Commit Graph

85 Commits

Author SHA1 Message Date
iziz
e40941e899 Update test code 2019-06-09 23:30:11 +09:00
iziz
16f5d25a6d Remove useless code & update metadata 2019-06-09 20:13:28 +09:00
Muhammad Ali
c801e2df11 updated metadata to latest 2018-10-10 17:49:04 +02:00
Frank
d5c22b8116
Merge pull request #246 from paween/mobileMapping
Add support to get country mobile token
2018-08-30 17:49:20 -07:00
Paween Itthipalkul
e8214731cf Add support to get country mobile token
See: https://github.com/googlei18n/libphonenumber/blob/master/java/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberUtil.java#L908
2018-08-06 16:31:52 -07:00
Jishnu Mohan
21d4d2b3a4 Update metadata for 8.9.10, 8.9.11 2018-07-26 17:06:55 +08:00
Jishnu Mohan
31e7057c07 Update metadata.
Updated with metadataGenerator and GeneratePhoneNumberHeader.sh
2018-06-20 12:02:30 +08:00
Frank
751357c4eb
Merge pull request #229 from paween/metadataGenerator
New JSON metadata generator
2018-03-05 13:04:49 -08:00
Frank
e66bd2993a
Merge pull request #227 from paween/perfTest
Improve phone number parsing performance by 28-32%
2018-02-27 14:19:35 -08:00
Paween Itthipalkul
d3d39d47d5 Made changes from PR review 2018-02-21 15:15:57 -08:00
Paween Itthipalkul
47f20db73d Updated PR to respond to review comments
- Removed NSLog in NBPhoneNumberParsingPerfTest
- Converted isNan from a method to a function.
- isNan is now only checking for integer value instead of a float, as the intended use for the function is to remove non-geological calling code, which can only be an integer.
2018-02-20 11:26:43 -08:00
Paween Itthipalkul
59b9a629c3 New JSON metadata generator
New JSON metadata generator that can be run directly from command line (using `swift` command) without any dependencies — however, currently, this must be run on the Mac.

This generator pulls in metadata, metadata for testing, and short number metadata directly from the latest commit on canonical libPhoneNumber GitHub repo.
2018-02-16 17:42:47 -08:00
Paween Itthipalkul
75aedc6757 Updated short number/emergency number metadata 2018-02-16 16:15:37 -08:00
Paween Itthipalkul
e6592fe801 Improve phone number parsing performance ~10-15%
Improve phone number parsing performance by:
- Using NSCache to cache metadata, so when parsing phone numbers from different regions, the metadata cache is still going to be valid.
- Improve various methods in NBPhoneNumberUtil by removing redundant operations, or using a different construct that’s more performant (such as using NSCharacterSet instead of NSScanner to check if a string is a number).

Also added a performance test that reads sample phone numbers from the metadata, and parse them.

Performance improvement result:
Machine:
Mac Pro (Late 2013)
2.7 GHz. 12-Core Intel Xeon E5
64 GB 1866 MHz DDR3
macOS High Sierra 10.13.3

Phone number to parse count: 2688

Baseline (5 runs -- in seconds):
0.362
0.372
0.385
0.363
0.365

After Change (5 runs -- in seconds):
0.312 (14% faster)
0.315 (13% faster)
0.317 (12% faster)
0.327 (10% faster)
0.308 (15% faster)
2018-02-16 15:51:16 -08:00
Paween Itthipalkul
b0f3a6bcec Improve phone number parsing performance ~10-15%
Improve phone number parsing performance by:
- Using NSCache to cache metadata, so when parsing phone numbers from different regions, the metadata cache is still going to be valid.
- Improve various methods in NBPhoneNumberUtil by removing redundant operations, or using a different construct that’s more performant (such as using NSCharacterSet instead of NSScanner to check if a string is a number).

Also added a performance test that reads sample phone numbers from the metadata, and parse them.

Performance improvement result:
Machine:
Mac Pro (Late 2013)
2.7 GHz. 12-Core Intel Xeon E5
64 GB 1866 MHz DDR3
macOS High Sierra 10.13.3

Phone number to parse count: 2688

Baseline (5 runs -- in seconds):
0.362
0.372
0.385
0.363
0.365

After Change (5 runs -- in seconds):
0.312 (14% faster)
0.315 (13% faster)
0.317 (12% faster)
0.327 (10% faster)
0.308 (15% faster)
2018-02-16 15:48:30 -08:00
dmaclach
c9fec5c606
Merge pull request #220 from paween/shortNumber
Add support for short number and emegerncy number in libPhoneNumber-iOS
2018-01-30 10:34:45 -08:00
iziz
1bab2b07be Update metadata from "7bbeabda0791b19a3f3c0d672cff622415874a8a [7bbeabd]" 2017-12-19 08:33:26 +09:00
Paween Itthipalkul
0c3e4566b7 Made changes according to code review
- Removed NBPhoneNumberUtil+Category
2017-12-18 12:46:02 -08:00
Paween Itthipalkul
c6fde0103c Add support for short number and emegerncy number in libPhoneNumber-iOS
This is a port of ShortNumberInfo class from Java version of libPhoneNumber into a category on NBPhoneNumberUtil class
2017-12-18 12:45:33 -08:00
Paween Itthipalkul
79bb46ba89 Add support for short number and emegerncy number in libPhoneNumber-iOS
This is a port of ShortNumberInfo class from Java version of libPhoneNumber into a category on NBPhoneNumberUtil class
2017-12-18 12:44:14 -08:00
Dave MacLachlan
ee9ead6cab Standardize formatting across files using
clang-format -style=Google
2017-11-18 16:11:20 -08:00
Dave MacLachlan
82daa2e2d2 Remove unneeded init from NBPhoneNumberDesc 2017-11-03 10:23:13 -07:00
Dave MacLachlan
3c594aebac Remove useless test methods from NBAsYouTypeFormatter 2017-11-03 10:10:37 -07:00
iziz
770b9f93e0 Update test code & metadata from 05bee8637c4981e9fb6fa06740704cc8b9d2172b [05bee86] (google's libphonenumber) 2017-10-21 02:47:13 +09:00
armat
ab533c3b61 Comments and additional tests 2017-08-30 13:53:50 +06:00
armat
46cdde8b39 renamed length validation methods and added tests for Russian numbers 2017-08-25 16:25:51 +06:00
Dave MacLachlan
28ffd16d69 Remove Old Testfiles that should be removed 2017-06-15 14:05:46 -07:00
Dave MacLachlan
d136f8da26 Merge branch 'master' into EnhancedMetadata 2017-06-15 09:28:10 -07:00
Dave MacLachlan
62d81c00ff Move tests out of single test methods into individual methods 2017-06-09 10:10:08 -07:00
iziz
3015ccf947 Fix test code 2 2017-05-02 06:06:18 +09:00
iziz
9e4c13908b Fix test code 2017-05-02 06:06:10 +09:00
iziz
c32f097a8d Update Metadata 2017-05-02 06:06:00 +09:00
iziz
c18abd4192 Fix test code 2 2017-05-02 03:10:25 +09:00
iziz
19106ba577 Fix test code 2017-05-02 03:06:18 +09:00
iziz
0469d7780b Merge branch 'master' into performance 2017-05-02 02:15:55 +09:00
iziz
e672b50f66 Update metadata 2017-05-02 02:12:06 +09:00
Dave MacLachlan
6c3c6a66ed Get rid of unnecessary allocations of NBPhoneNumberUtil and use shared 2017-03-20 12:11:43 -07:00
Dave MacLachlan
d7869c2322 Move to using compressed JSON for Metadata 2017-03-17 17:11:00 -07:00
iziz
d0caea2490 Update metadata from libphonenumber 8.3.0 2017-02-16 01:16:07 +09:00
iziz
65cea862c9 Update metadata using libphonenumber 8.2.0 41cf5825b740448ec79e42586f9ee59aaf61184f [41cf582] 2017-02-08 00:22:41 +09:00
Jiatong He
61254e6ca9 Porting normalizeDiallableCharsOnly to objc 2017-01-30 12:09:51 -08:00
iziz
7572eb5b43 Cleanup and Rebuild schemes and it frameworks name & Update metadata with 7.7.5 2016-11-27 00:14:04 +09:00
ishtar
58b7ed2c15 Implement missing specs 2016-10-10 09:19:55 +09:00
ishtar
c29a7949b8 Update metadata from 211b7531c6f0c38e661066a86782d8edc81fa777 2016-10-10 02:01:40 +09:00
ishtar
f1c1561bda Update metadata from libphonenumber (August 19, 2016 at 10:20:35 PM GMT+9) 2016-08-21 22:40:09 +09:00
ishtar
15617e1d02 Update metadata from 7.4.5 2016-07-21 21:52:02 +09:00
ishtar
5cc1c525e2 Metadata updates for libphonenumber 7.4.4 2016-06-29 23:03:16 +09:00
ishtar
4d6de3b09d Update metadata from 7.4.1 2016-05-30 02:16:10 +09:00
iziz
a76423b438 Add GEO_MOBILE_COUNTRIES array var 2016-05-02 03:48:44 +09:00
iziz
b2fb8a1d3c Update metadata from libphonenumber 7.3.1 2016-05-02 03:47:50 +09:00