Commit 53f013ca authored by Elizabeth Popova's avatar Elizabeth Popova Committed by Chromium LUCI CQ

[Autofill] Add regex keywords in Indonesian

These are common label values found on top 20 Indonesian websites. This
should improve classification when field name is absent or ambiguous.

Also modify french regex for names to exclude words like "nombre" and
"nomor", but still match "nom" and "nom de famille".

Bug: 1154727
Change-Id: I5772df8ce6a1092a800b7178dc17b3ac6c7f2e9f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2598853Reviewed-by: default avatarDavid Roger <droger@chromium.org>
Reviewed-by: default avatarMatthias Körber <koerber@google.com>
Commit-Queue: Elizabeth Popova <lizapopova@google.com>
Cr-Commit-Position: refs/heads/master@{#840536}
parent de844809
......@@ -177,7 +177,9 @@ FormStructureBrowserTest::FormStructureBrowserTest()
// TODO(crbug.com/1076175) Remove once launched.
autofill::features::kAutofillUseNewSectioningMethod,
// Remove once launched
autofill::features::kAutofillEnableAugmentedPhoneCountryCode},
autofill::features::kAutofillEnableAugmentedPhoneCountryCode,
// TODO(crbug.com/1157405) Remove once launched.
autofill::features::kAutofillEnableDependentLocalityParsing},
// Disabled
{autofill::features::kAutofillRestrictUnownedFieldsToFormlessCheckout});
}
......
......@@ -239,6 +239,16 @@
"match_field_attributes": 3,
"match_field_input_types": 1
}
],
"id": [
{
"pattern_identifier": "id_address_name_ignored_preserving",
"positive_pattern": "(label|judul|nama) alamat",
"positive_score": 1.1,
"negative_pattern": null,
"match_field_attributes": 3,
"match_field_input_types": 1
}
]
},
"COMPANY": {
......@@ -341,6 +351,16 @@
"match_field_attributes": 3,
"match_field_input_types": 1
}
],
"id": [
{
"pattern_identifier": "id_company_preserving",
"positive_pattern": "(nama.?)?perusahaan",
"positive_score": 1.1,
"negative_pattern": null,
"match_field_attributes": 3,
"match_field_input_types": 1
}
]
},
"ADDRESS_LINE_1": {
......@@ -510,6 +530,25 @@
"match_field_attributes": 1,
"match_field_input_types": 1
}
],
"id": [
{
"pattern_identifier": "id_address_line_1_preserving",
"positive_pattern": "^alamat",
"positive_score": 1.1,
"negative_pattern": null,
"match_field_attributes": 3,
"match_field_input_types": 1
}
,
{
"pattern_identifier": "id_address_line_1_label_preserving",
"positive_pattern": "^alamat",
"positive_score": 1.1,
"negative_pattern": null,
"match_field_attributes": 1,
"match_field_input_types": 1
}
]
},
"ADDRESS_LINE_2": {
......@@ -788,6 +827,16 @@
"match_field_attributes": 3,
"match_field_input_types": 137
}
],
"id": [
{
"pattern_identifier": "id_country_preserving",
"positive_pattern": "negara",
"positive_score": 1.1,
"negative_pattern": null,
"match_field_attributes": 3,
"match_field_input_types": 137
}
]
},
"COUNTRY_LOCATION": {
......@@ -942,6 +991,16 @@
"match_field_attributes": 3,
"match_field_input_types": 69
}
],
"id": [
{
"pattern_identifier": "id_zip_code_preserving",
"positive_pattern": "kode.?pos",
"positive_score": 1.1,
"negative_pattern": null,
"match_field_attributes": 3,
"match_field_input_types": 69
}
]
},
"ZIP_4": {
......@@ -996,6 +1055,16 @@
"match_field_attributes": 3,
"match_field_input_types": 137
}
],
"id": [
{
"pattern_identifier": "id_dependent_locality_preserving",
"positive_pattern": "kecamatan",
"positive_score": 1.1,
"negative_pattern": null,
"match_field_attributes": 3,
"match_field_input_types": 137
}
]
},
"CITY": {
......@@ -1138,6 +1207,16 @@
"match_field_attributes": 3,
"match_field_input_types": 137
}
],
"id": [
{
"pattern_identifier": "id_city_preserving",
"positive_pattern": "kota|kabupaten",
"positive_score": 1.1,
"negative_pattern": null,
"match_field_attributes": 3,
"match_field_input_types": 137
}
]
},
"STATE": {
......@@ -1240,6 +1319,16 @@
"match_field_attributes": 3,
"match_field_input_types": 137
}
],
"id": [
{
"pattern_identifier": "id_state_preserving",
"positive_pattern": "provinci",
"positive_score": 1.1,
"negative_pattern": null,
"match_field_attributes": 3,
"match_field_input_types": 137
}
]
},
"SEARCH_TERM": {
......@@ -1446,6 +1535,16 @@
"match_field_attributes": 3,
"match_field_input_types": 1
}
],
"id": [
{
"pattern_identifier": "id_name_on_card_preserving",
"positive_pattern": "nama.*kartu",
"positive_score": 1.0,
"negative_pattern": null,
"match_field_attributes": 3,
"match_field_input_types": 1
}
]
},
"NAME_ON_CARD_CONTEXTUAL": {
......@@ -1560,6 +1659,16 @@
"match_field_attributes": 3,
"match_field_input_types": 101
}
],
"id": [
{
"pattern_identifier": "id_card_number_preserving",
"positive_pattern": "no.*kartu",
"positive_score": 1.0,
"negative_pattern": null,
"match_field_attributes": 3,
"match_field_input_types": 101
}
]
},
"CREDIT_CARD_VERIFICATION_CODE": {
......@@ -1664,6 +1773,16 @@
"match_field_attributes": 3,
"match_field_input_types": 205
}
],
"id": [
{
"pattern_identifier": "id_card_exp_month_preserving",
"positive_pattern": "masa berlaku|berlaku hingga",
"positive_score": 1.0,
"negative_pattern": null,
"match_field_attributes": 3,
"match_field_input_types": 205
}
]
},
"CREDIT_CARD_EXP_YEAR": {
......@@ -1852,6 +1971,16 @@
"match_field_attributes": 3,
"match_field_input_types": 205
}
],
"id": [
{
"pattern_identifier": "id_card_exp_date_preserving",
"positive_pattern": "masa berlaku|berlaku hingga",
"positive_score": 1.0,
"negative_pattern": null,
"match_field_attributes": 3,
"match_field_input_types": 205
}
]
},
"CREDIT_CARD_EXP_MONTH_BEFORE_YEAR": {
......@@ -2114,7 +2243,7 @@
"fr": [
{
"pattern_identifier": "fr_full_name_preserving",
"positive_pattern": "^nom(?!bre)",
"positive_pattern": "^nom(?![a-zA-Z])",
"positive_score": 0.9,
"negative_pattern": null,
"match_field_attributes": 3,
......@@ -2180,6 +2309,16 @@
"match_field_attributes": 3,
"match_field_input_types": 1
}
],
"id": [
{
"pattern_identifier": "id_full_name_preserving",
"positive_pattern": "nama.?(lengkap|penerima|kamu)",
"positive_score": 0.9,
"negative_pattern": null,
"match_field_attributes": 3,
"match_field_input_types": 1
}
]
},
"NAME_SPECIFIC": {
......@@ -2334,6 +2473,16 @@
"match_field_attributes": 3,
"match_field_input_types": 1
}
],
"id": [
{
"pattern_identifier": "id_first_name_preserving",
"positive_pattern": "nama depan",
"positive_score": 0.9,
"negative_pattern": null,
"match_field_attributes": 3,
"match_field_input_types": 1
}
]
},
"MIDDLE_INITIAL": {
......@@ -2394,7 +2543,7 @@
"fr": [
{
"pattern_identifier": "fr_last_name_preserving",
"positive_pattern": "famille|^nom(?!bre)",
"positive_pattern": "famille|^nom(?![a-zA-Z])",
"positive_score": 0.9,
"negative_pattern": null,
"match_field_attributes": 3,
......@@ -2490,6 +2639,16 @@
"match_field_attributes": 3,
"match_field_input_types": 1
}
],
"id": [
{
"pattern_identifier": "id_last_name_preserving",
"positive_pattern": "nama belakang",
"positive_score": 0.9,
"negative_pattern": null,
"match_field_attributes": 3,
"match_field_input_types": 1
}
]
},
"LAST_NAME_FIRST": {
......@@ -2718,6 +2877,16 @@
"match_field_attributes": 3,
"match_field_input_types": 69
}
],
"id": [
{
"pattern_identifier": "id_phone_preserving",
"positive_pattern": "telepon|ponsel|(nomor|no\\.?).?(hp|handphone)",
"positive_score": 1.2,
"negative_pattern": null,
"match_field_attributes": 3,
"match_field_input_types": 69
}
]
},
"AUGMENTED_PHONE_COUNTRY_CODE": {
......
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<form action="http://www.google.com/" method="post">
<label for="fn">Nama Depan:</label> <input type="text" id="fn"><br>
<label for="ln">Nama Belakang:</label> <input type="text" id="ln"><br>
<label for="cm">Nama Perusahaan:</label> <input type="text" id="cm"><br>
<label for="a1">Alamat:</label> <input type="text" id="a1"><br>
<label for="st">Provinci:</label> <input type="text" id="st"><br>
<label for="ct">Kota/Kabupaten:</label> <input type="text" id="ct"><br>
<label for="dl">Kecamatan:</label> <input type="text" id="dl"><br>
<label for="zc">Kode Pos:</label> <input type="text" id="zc"><br>
<label for="em">Email:</label> <input type="text" id="em"><br>
<label for="ph">Nomor Telepon:</label> <input type="text" id="ph"><br>
<label for="c1">Nama di kartu:</label> <input type="text" id="c1"><br>
<label for="c2">Nomor Kartu:</label> <input type="text" id="c2"><br>
<label for="c3">Masa Berlaku:</label> <input type="text" id="c3"><br>
<label for="c4">Masa Berlaku:</label> <input type="text" id="c4"><br>
</form>
</body>
</html>
\ No newline at end of file
<form id="tambah-alamat" class="form-horizontal" novalidate="novalidate">
<div class="form-group">
<div class="col-xs-12">
<label for="alamat" class="control-label">Nama Alamat <span class="asterisk-alert">*</span></label>
<input type="text" class="form-control" id="txtAddAddressNewAddress" name="txtAddAddressNewAddress" placeholder=""
maxlength="30" autocomplete="off" aria-required="true">
</div>
</div>
<div class="form-group">
<div class="col-xs-6">
<label for="nama" class="control-label">Nama Penerima <span class="asterisk-alert">*</span></label>
<input type="text" class="form-control" id="txtNameNewAddress" name="txtNameNewAddress" placeholder=""
maxlength="30" autocomplete="off" aria-required="true">
</div>
<div class="col-xs-6">
<label for="telephone" class="control-label">Telepon <span class="asterisk-alert">*</span></label>
<input type="tel" class="form-control" id="txtHandphoneNewAddress" name="txtHandphoneNewAddress" placeholder=""
maxlength="16" autocomplete="off" aria-required="true">
</div>
</div>
<div class="form-group">
<div class="col-xs-6">
<label for="provinsi" class="control-label">Provinsi <span class="asterisk-alert">*</span></label>
<select class="form-control" id="listProvince" name="listProvince" aria-required="true">
<option value="">Pilih Provinsi</option>
<option value="51">BALI</option>
<option value="19">BANGKA BELITUNG</option>
<option value="36">BANTEN</option>
<option value="17">BENGKULU</option>
<option value="34">DI YOGYAKARTA</option>
<option value="31">DKI JAKARTA</option>
<option value="75">GORONTALO</option>
<option value="15">JAMBI</option>
<option value="32">JAWA BARAT</option>
<option value="33">JAWA TENGAH</option>
<option value="35">JAWA TIMUR</option>
<option value="61">KALIMANTAN BARAT</option>
<option value="63">KALIMANTAN SELATAN</option>
<option value="62">KALIMANTAN TENGAH</option>
<option value="64">KALIMANTAN TIMUR</option>
<option value="65">KALIMANTAN UTARA</option>
<option value="82">KEPULAUAN MALUKU</option>
<option value="21">KEPULAUAN RIAU</option>
<option value="18">LAMPUNG</option>
<option value="81">MALUKU</option>
<option value="11">NANGGROE ACEH DARUSSALAM (NAD)</option>
<option value="52">NUSA TENGGARA BARAT (NTB)</option>
<option value="53">NUSA TENGGARA TIMUR (NTT)</option>
<option value="94">PAPUA</option>
<option value="91">PAPUA BARAT</option>
<option value="14">RIAU</option>
<option value="76">SULAWESI BARAT</option>
<option value="73">SULAWESI SELATAN</option>
<option value="72">SULAWESI TENGAH</option>
<option value="74">SULAWESI TENGGARA</option>
<option value="71">SULAWESI UTARA</option>
<option value="13">SUMATERA BARAT</option>
<option value="16">SUMATERA SELATAN</option>
<option value="12">SUMATERA UTARA</option>
</select>
</div>
<div class="col-xs-6">
<label for="KotaKabupaten" class="control-label">Kota/kabupaten <span class="asterisk-alert">*</span></label>
<select class="form-control" id="listCity" name="listCity" aria-required="true">
<option value="">Pilih Kabupaten</option>
</select>
</div>
</div>
<div class="form-group">
<div class="col-xs-6">
<label for="kecamatan" class="control-label">Kecamatan <span class="asterisk-alert">*</span></label>
<select class="form-control" id="listDistrict" name="listDistrict" aria-required="true">
<option value="">Pilih Kecamatan</option>
</select>
</div>
<div class="col-xs-6">
<label for="kelurahan" class="control-label">Kelurahan <span class="asterisk-alert">*</span></label>
<select class="form-control" id="listVillage" name="listVillage" aria-required="true">
<option value="">Pilih Kelurahan</option>
</select>
</div>
</div>
<div class="form-group">
<div class="col-xs-12">
<label for="alamatlengkap" class="control-label">Alamat <span class="asterisk-alert">*</span></label>
<textarea class="form-control" id="txtAddressNewAddress" name="txtAddressNewAddress" placeholder=""
aria-required="true"></textarea>
<p class="error_validate" style="color:#999; font-style:italic;">Mohon masukkan alamat dengan lengkap (Nama Jalan,
Nama Perumahan, Blok Rumah, Nomor Rumah, RT/RW).</p>
</div>
</div>
<div class="form-group">
<div class="col-xs-6">
<label for="kodepos" class="control-label">Kode pos <span class="asterisk-alert">*</span></label>
<input type="text" class="form-control" id="txtPostalCodeNewAddress" name="txtPostalCodeNewAddress" placeholder=""
maxlength="5" autocomplete="off" aria-required="true">
</div>
</div>
<div class="form-group">
<div class="col-xs-12">
<div id="address-map" class="pin-alamat" data-attr="addAddress" data-mapid="map" data-inputid="pac-input"></div>
</div>
</div>
<input type="hidden" id="addLat" name="addressLat" value="">
<input type="hidden" id="addLng" name="addressLng" value="">
<div class="form-group">
<div class="col-xs-offset-4 col-xs-8 alamat-checkbox">
<input type="checkbox" id="isDelivery" name="isDelivery"> Atur Sebagai Default Pengiriman
</div>
</div>
<div class="form-group">
<div class="col-xs-8"></div>
<div class="col-xs-4">
<button type="button" id="btnAddNewAddress"
class="btn btn-default btn-simpan btn-simpan-small2 mb-10">SIMPAN</button>
</div>
</div>
</form>
\ No newline at end of file
<div class="shopee-popup-form shopee-popup-form--credit-card">
<div class="shopee-popup-form__header">
<div class="shopee-popup-form__title">Tambah Kartu Kredit Baru</div>
</div>
<div class="shopee-popup-form__main">
<div class="shopee-popup-form__main-container">
<div class="shopee-popup-form__server-error"></div>
<div class="_2FTWh8">
<div class="_2syZgE"><input class="_3FAIsa" type="text" placeholder="Nama Tertera di Kartu" value=""></div>
<div></div>
</div>
<div class="input-credit-card">
<div class="input-credit-card__input">
<div class="_2FTWh8">
<div class="_2syZgE lLictc"><input class="_3FAIsa" type="text" placeholder="No. Kartu Kredit" maxlength="19"
value=""></div>
<div><span class="_3o6Z5s shopee-modal__transition-enter-done">Mohon isi di kolom berikut</span></div>
</div>
</div>
<div class="input-credit-card__logo-wrapper"><span
class="input-credit-card__logo input-credit-card__logo--visa input-credit-card__logo--grey"></span></div>
<div class="input-credit-card__logo-wrapper"><span
class="input-credit-card__logo input-credit-card__logo--mastercard input-credit-card__logo--grey"></span>
</div>
<div class="input-credit-card__logo-wrapper"><span
class="input-credit-card__logo input-credit-card__logo--jcb input-credit-card__logo--grey"></span></div>
<div class="input-credit-card__logo-wrapper"><span
class="input-credit-card__logo input-credit-card__logo--amex input-credit-card__logo--grey"></span></div>
</div>
<div class="row">
<div class="col-xs-6">
<div class="shopee-popup-form__subheader">
<div class="shopee-popup-form__subheader-text">Kadaluarsa pada</div>
</div>
</div>
<div class="col-xs-6">
<div class="shopee-popup-form__subheader">
<div class="shopee-popup-form__subheader-text">CVV</div>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-6">
<div class="_2FTWh8">
<div class="_2syZgE lLictc"><input class="_3FAIsa" type="text" placeholder="MM/YY" maxlength="5" value=""></div>
<div><span class="_3o6Z5s shopee-modal__transition-enter-done">Tanggal Kedaluwarsa Tidak Sah</span></div>
</div>
</div>
<div class="col-xs-6">
<div class="_2FTWh8">
<div class="_2syZgE"><input class="_3FAIsa" type="text" placeholder="000" maxlength="4" value=""></div>
<div></div>
</div>
</div>
</div>
<div class="_2FTWh8">
<div class="_2syZgE"><input class="_3FAIsa" type="text" placeholder="Alamat Tagihan" maxlength="1000" value="">
</div>
<div></div>
</div>
<div class="_2FTWh8">
<div class="_2syZgE"><input class="_3FAIsa" type="text" placeholder="Kode Pos" maxlength="100" value=""></div>
<div></div>
</div>
<div class="shopee-popup-form__message">Kami bekerja sama dengan NicePay untuk memastikan bahwa informasi kartu
kredit Anda tetap terlindungi. Shopee tidak akan mengakses info kartu kredit Anda.</div>
</div>
</div>
<div class="shopee-popup-form__footer"><button class="cancel-btn">Nanti Saja</button><button type="button"
class="btn btn-solid-primary btn--s btn--inline khi9AY" aria-disabled="false">OK</button></div>
</div>
\ No newline at end of file
NAME_FIRST | fn | Nama Depan: | | fn_1-default
NAME_LAST | ln | Nama Belakang: | | fn_1-default
COMPANY_NAME | cm | Nama Perusahaan: | | fn_1-default
ADDRESS_HOME_LINE1 | a1 | Alamat: | | fn_1-default
ADDRESS_HOME_STATE | st | Provinci: | | fn_1-default
ADDRESS_HOME_CITY | ct | Kota/Kabupaten: | | fn_1-default
ADDRESS_HOME_DEPENDENT_LOCALITY | dl | Kecamatan: | | fn_1-default
ADDRESS_HOME_ZIP | zc | Kode Pos: | | fn_1-default
EMAIL_ADDRESS | em | Email: | | fn_1-default
PHONE_HOME_WHOLE_NUMBER | ph | Nomor Telepon: | | fn_1-default
CREDIT_CARD_NAME_FULL | c1 | Nama di kartu: | | credit-card-cc
CREDIT_CARD_NUMBER | c2 | Nomor Kartu: | | credit-card-cc
CREDIT_CARD_EXP_MONTH | c3 | Masa Berlaku: | | credit-card-cc
CREDIT_CARD_EXP_4_DIGIT_YEAR | c4 | Masa Berlaku: | | credit-card-cc
UNKNOWN_TYPE | txtAddAddressNewAddress | Nama Alamat * | | txtAddAddressNewAddress_1-default
NAME_FULL | txtNameNewAddress | Nama Penerima * | | txtAddAddressNewAddress_1-default
PHONE_HOME_WHOLE_NUMBER | txtHandphoneNewAddress | Telepon * | | txtAddAddressNewAddress_1-default
ADDRESS_HOME_STATE | listProvince | Provinsi * | | txtAddAddressNewAddress_1-default
ADDRESS_HOME_CITY | listCity | Kota/kabupaten * | | txtAddAddressNewAddress_1-default
ADDRESS_HOME_DEPENDENT_LOCALITY | listDistrict | Kecamatan * | | txtAddAddressNewAddress_1-default
UNKNOWN_TYPE | listVillage | Kelurahan * | | txtAddAddressNewAddress_1-default
ADDRESS_HOME_STREET_ADDRESS | txtAddressNewAddress | Alamat * | | txtAddAddressNewAddress_1-default
ADDRESS_HOME_ZIP | txtPostalCodeNewAddress | Kode pos * | | txtAddAddressNewAddress_1-default
UNKNOWN_TYPE | isDelivery | Atur Sebagai Default Pengiriman | on | txtAddAddressNewAddress_1-default
CREDIT_CARD_NAME_FULL | | Nama Tertera di Kartu | | credit-card-cc
CREDIT_CARD_NUMBER | | No. Kartu Kredit | | credit-card-cc
CREDIT_CARD_EXP_DATE_2_DIGIT_YEAR | | MM/YY | | credit-card-cc
UNKNOWN_TYPE | | 000 | | _2-default
ADDRESS_HOME_LINE1 | | Alamat Tagihan | | _2-default
ADDRESS_HOME_ZIP | | Kode Pos | | _2-default
......@@ -364,6 +364,9 @@ bundle_data("unit_tests_bundle_data") {
"//components/test/data/autofill/heuristics/input/171_i18n_ru_structured_address_2.html",
"//components/test/data/autofill/heuristics/input/172_i18n_pt_structured_address_1.html",
"//components/test/data/autofill/heuristics/input/173_i18n_pt_structured_address_2.html",
"//components/test/data/autofill/heuristics/input/174_i18n_id.html",
"//components/test/data/autofill/heuristics/input/175_id_address_alfacart.com.html",
"//components/test/data/autofill/heuristics/input/176_id_payment_shopee.co.id.html",
"//components/test/data/autofill/heuristics/output/000_i18n_de.out",
"//components/test/data/autofill/heuristics/output/001_i18n_de2.out",
"//components/test/data/autofill/heuristics/output/002_i18n_en.out",
......@@ -537,6 +540,9 @@ bundle_data("unit_tests_bundle_data") {
"//components/test/data/autofill/heuristics/output/171_i18n_ru_structured_address_2.out",
"//components/test/data/autofill/heuristics/output/172_i18n_pt_structured_address_1.out",
"//components/test/data/autofill/heuristics/output/173_i18n_pt_structured_address_2.out",
"//components/test/data/autofill/heuristics/output/174_i18n_id.out",
"//components/test/data/autofill/heuristics/output/175_id_address_alfacart.com.out",
"//components/test/data/autofill/heuristics/output/176_id_payment_shopee.co.id.out",
]
outputs = [ "{{bundle_resources_dir}}/" +
"{{source_root_relative_dir}}/{{source_file_part}}" ]
......
......@@ -142,6 +142,8 @@ FormStructureBrowserTest::FormStructureBrowserTest()
autofill::features::kAutofillUseNewSectioningMethod,
// TODO(crbug.com/1150890) Remove once launched
autofill::features::kAutofillEnableAugmentedPhoneCountryCode,
// TODO(crbug.com/1157405) Remove once launched.
autofill::features::kAutofillEnableDependentLocalityParsing,
},
// Disabled
{autofill::features::kAutofillRestrictUnownedFieldsToFormlessCheckout});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment