chromium/components/test/data/autofill/heuristics-json/test.json

{
   "config": {
      "country": "US",
      "fields_in_scope": [ "UNKNOWN_TYPE", "ADDRESS_HOME_CITY", "ADDRESS_HOME_COUNTRY", "ADDRESS_HOME_LINE1", "ADDRESS_HOME_LINE2", "ADDRESS_HOME_LINE3", "ADDRESS_HOME_STATE", "ADDRESS_HOME_STREET_ADDRESS", "ADDRESS_HOME_ZIP", "COMPANY_NAME", "CREDIT_CARD_EXP_2_DIGIT_YEAR", "CREDIT_CARD_EXP_4_DIGIT_YEAR", "CREDIT_CARD_EXP_DATE_2_DIGIT_YEAR", "CREDIT_CARD_EXP_DATE_4_DIGIT_YEAR", "CREDIT_CARD_EXP_MONTH", "CREDIT_CARD_NAME_FIRST", "CREDIT_CARD_NAME_FULL", "CREDIT_CARD_NAME_LAST", "CREDIT_CARD_NUMBER", "CREDIT_CARD_TYPE", "CREDIT_CARD_VERIFICATION_CODE", "EMAIL_ADDRESS", "NAME_FIRST", "NAME_FULL", "NAME_LAST", "NAME_MIDDLE", "NAME_MIDDLE_INITIAL", "PHONE_HOME_CITY_AND_NUMBER", "PHONE_HOME_CITY_AND_NUMBER_WITHOUT_TRUNK_PREFIX", "PHONE_HOME_COUNTRY_CODE", "PHONE_HOME_EXTENSION", "PHONE_HOME_WHOLE_NUMBER", "PHONE_HOME_CITY_AND_NUMBER", "PHONE_HOME_CITY_AND_NUMBER_WITHOUT_TRUNK_PREFIX", "PHONE_HOME_COUNTRY_CODE", "PHONE_HOME_EXTENSION", "PHONE_HOME_WHOLE_NUMBER", "PHONE_HOME_CITY_CODE", "PHONE_HOME_CITY_CODE_WITH_TRUNK_PREFIX", "PHONE_HOME_NUMBER_PREFIX", "PHONE_HOME_NUMBER_SUFFIX", "PHONE_HOME_NUMBER" ],
      "language": "en"
   },
   "sites": [ {
      "forms": [ {
         "fields": [ {
            "autocomplete_attr": "given-name",
            "field_position": 0,
            "field_signature": "1855613035",
            "id": "15461699092647468671_1855613035_0",
            "id_attr": "first-name",
            "label_attr": "First name",
            "last_classification": "NAME_FIRST",
            "last_correctness": "correct",
            "name_attr": "firstName",
            "tester_type": [ "NAME_FIRST" ],
            "type_attr": "text"
         }, {
            "autocomplete_attr": "family-name",
            "field_position": 1,
            "field_signature": "4163345999",
            "id": "15461699092647468671_4163345999_0",
            "label_attr": "Last name",
            "last_classification": "NAME_LAST",
            "last_correctness": "correct",
            "name_attr": "lastName",
            "tester_type": [ "NAME_LAST" ],
            "type_attr": "text"
         }, {
            "autocomplete_attr": "on",
            "field_position": 2,
            "field_signature": "2267517795",
            "id": "15461699092647468671_2267517795_0",
            "label_attr": "Street address",
            "last_classification": "ADDRESS_HOME_LINE1",
            "last_correctness": "correct",
            "name_attr": "address1",
            "tester_type": [ "ADDRESS_HOME_LINE1" ],
            "type_attr": "text"
         }, {
            "autocomplete_attr": "address-line2",
            "field_position": 3,
            "field_signature": "1236818338",
            "id": "15461699092647468671_1236818338_0",
            "label_attr": "Apt, suite, unit, bldg",
            "last_classification": "ADDRESS_HOME_LINE2",
            "last_correctness": "correct",
            "name_attr": "address2",
            "tester_type": [ "ADDRESS_HOME_LINE2" ],
            "type_attr": "text"
         }, {
            "autocomplete_attr": "postal-code",
            "field_position": 4,
            "field_signature": "403123063",
            "id": "15461699092647468671_403123063_0",
            "label_attr": "Zip code",
            "last_classification": "ADDRESS_HOME_ZIP",
            "last_correctness": "correct",
            "maxlength_attr": "5",
            "name_attr": "postalCode",
            "tester_type": [ "ADDRESS_HOME_ZIP" ],
            "type_attr": "tel"
         }, {
            "autocomplete_attr": "region",
            "field_position": 5,
            "field_signature": "1878375253",
            "id": "15461699092647468671_1878375253_0",
            "label_attr": "State",
            "last_classification": "ADDRESS_HOME_STATE",
            "last_correctness": "correct",
            "name_attr": "state",
            "tester_type": [ "ADDRESS_HOME_STATE" ]
         }, {
            "autocomplete_attr": "locality",
            "field_position": 6,
            "field_signature": "2098554694",
            "id": "15461699092647468671_2098554694_0",
            "label_attr": "City",
            "last_classification": "ADDRESS_HOME_CITY",
            "last_correctness": "correct",
            "name_attr": "city",
            "tester_type": [ "ADDRESS_HOME_CITY" ],
            "type_attr": "text"
         }, {
            "autocomplete_attr": "country",
            "field_position": 7,
            "field_signature": "2799270304",
            "id": "15461699092647468671_2799270304_0",
            "label_attr": "Country",
            "last_classification": "ADDRESS_HOME_COUNTRY",
            "last_correctness": "correct",
            "name_attr": "country",
            "tester_type": [ "ADDRESS_HOME_COUNTRY" ]
         }, {
            "autocomplete_attr": "tel",
            "field_position": 8,
            "field_signature": "4273987765",
            "id": "15461699092647468671_4273987765_0",
            "label_attr": "Phone number",
            "last_classification": "PHONE_HOME_WHOLE_NUMBER",
            "last_correctness": "not_recognized: PHONE_HOME_CITY_AND_NUMBER, chosen_instead: PHONE_HOME_WHOLE_NUMBER",
            "tester_type": [ "PHONE_HOME_CITY_AND_NUMBER" ],
            "type_attr": "tel"
         } ],
         "form_signature": "15461699092647468671"
      }, {
         "fields": [ {
            "autocomplete_attr": "given-name",
            "field_position": 0,
            "field_signature": "1855613035",
            "id": "15986057706235728642_1855613035_0",
            "label_attr": "First name",
            "last_classification": "NAME_FIRST",
            "last_correctness": "correct",
            "name_attr": "firstName",
            "tester_type": [ "NAME_FIRST" ],
            "type_attr": "text"
         }, {
            "autocomplete_attr": "family-name",
            "field_position": 1,
            "field_signature": "4163345999",
            "id": "15986057706235728642_4163345999_0",
            "label_attr": "Last name",
            "last_classification": "NAME_LAST",
            "last_correctness": "correct",
            "name_attr": "lastName",
            "tester_type": [ "NAME_LAST" ],
            "type_attr": "text"
         }, {
            "autocomplete_attr": "on",
            "field_position": 2,
            "field_signature": "2267517795",
            "id": "15986057706235728642_2267517795_0",
            "label_attr": "Street address",
            "last_classification": "ADDRESS_HOME_LINE1",
            "last_correctness": "correct",
            "name_attr": "address1",
            "tester_type": [ "ADDRESS_HOME_LINE1" ],
            "type_attr": "text"
         }, {
            "autocomplete_attr": "address-line2",
            "field_position": 3,
            "field_signature": "1236818338",
            "id": "15986057706235728642_1236818338_0",
            "label_attr": "Apt, suite, unit, bldg",
            "last_classification": "ADDRESS_HOME_LINE2",
            "last_correctness": "correct",
            "name_attr": "address2",
            "tester_type": [ "ADDRESS_HOME_LINE2" ],
            "type_attr": "text"
         }, {
            "autocomplete_attr": "postal-code",
            "field_position": 4,
            "field_signature": "403123063",
            "id": "15986057706235728642_403123063_0",
            "label_attr": "Zip code",
            "last_classification": "ADDRESS_HOME_ZIP",
            "last_correctness": "correct",
            "name_attr": "postalCode",
            "tester_type": [ "ADDRESS_HOME_ZIP" ],
            "type_attr": "tel"
         }, {
            "autocomplete_attr": "region",
            "field_position": 5,
            "field_signature": "1878375253",
            "id": "15986057706235728642_1878375253_0",
            "label_attr": "State",
            "last_classification": "ADDRESS_HOME_STATE",
            "last_correctness": "correct",
            "name_attr": "state",
            "tester_type": [ "ADDRESS_HOME_STATE" ]
         }, {
            "autocomplete_attr": "locality",
            "field_position": 6,
            "field_signature": "2098554694",
            "id": "15986057706235728642_2098554694_0",
            "label_attr": "City",
            "last_classification": "ADDRESS_HOME_CITY",
            "last_correctness": "correct",
            "name_attr": "city",
            "tester_type": [ "ADDRESS_HOME_CITY" ],
            "type_attr": "text"
         } ],
         "form_signature": "15986057706235728642"
      }, {
         "__comment__": "Regression test for b/299184378; two consecutive name on card fields can be recognized",
         "fields": [ {
            "field_position": 0,
            "field_signature": "3606557171",
            "id": "26181089576506062333_3606557171_0",
            "label_attr": "Name on card",
            "last_classification": "CREDIT_CARD_NAME_FULL",
            "last_correctness": "correct",
            "name_attr": "creditCardName",
            "tester_type": [ "CREDIT_CARD_NAME_FULL" ],
            "type_attr": "text"
         }, {
            "field_position": 1,
            "field_signature": "3606557171",
            "id": "26181089576506062333_3606557171_1",
            "label_attr": "Name on card",
            "last_classification": "CREDIT_CARD_NAME_FULL",
            "last_correctness": "correct",
            "name_attr": "creditCardName",
            "tester_type": [ "CREDIT_CARD_NAME_FULL" ],
            "type_attr": "text"
         }, {
            "field_position": 2,
            "field_signature": "1266406126",
            "id": "26181089576506062333_1266406126_0",
            "label_attr": "Credit card number",
            "last_classification": "CREDIT_CARD_NUMBER",
            "last_correctness": "correct",
            "name_attr": "cardNumber",
            "tester_type": [ "CREDIT_CARD_NUMBER" ],
            "type_attr": "tel"
         }, {
            "field_position": 3,
            "field_signature": "562574980",
            "id": "26181089576506062333_562574980_0",
            "label_attr": "CVV",
            "last_classification": "CREDIT_CARD_VERIFICATION_CODE",
            "last_correctness": "correct",
            "name_attr": "cvvControl",
            "tester_type": [ "CREDIT_CARD_VERIFICATION_CODE" ],
            "type_attr": "tel"
         } ],
         "form_signature": "26181089576506062333"
      }, {
         "fields": [ {
            "field_position": 0,
            "field_signature": "1266406126",
            "id": "16181089576506062333_1266406126_0",
            "label_attr": "Card number",
            "last_classification": "CREDIT_CARD_NUMBER",
            "last_correctness": "correct",
            "name_attr": "cardNumber",
            "tester_type": [ "CREDIT_CARD_NUMBER" ],
            "type_attr": "tel"
         }, {
            "field_position": 1,
            "field_signature": "3606557171",
            "id": "16181089576506062333_3606557171_0",
            "label_attr": "Name on card",
            "last_classification": "CREDIT_CARD_NAME_FULL",
            "last_correctness": "correct",
            "name_attr": "creditCardName",
            "tester_type": [ "CREDIT_CARD_NAME_FULL" ],
            "type_attr": "text"
         }, {
            "field_position": 2,
            "field_signature": "562574980",
            "id": "16181089576506062333_562574980_0",
            "label_attr": "CVV",
            "last_classification": "CREDIT_CARD_VERIFICATION_CODE",
            "last_correctness": "correct",
            "name_attr": "cvvControl",
            "tester_type": [ "CREDIT_CARD_VERIFICATION_CODE" ],
            "type_attr": "tel"
         } ],
         "form_signature": "16181089576506062333"
      }, {
         "fields": [ {
            "field_position": 0,
            "field_signature": "4103469401",
            "id": "7542824740940430359_4103469401_0",
            "label_attr": "Email address",
            "last_classification": "UNKNOWN_TYPE",
            "last_correctness": "ignored: USERNAME_AND_EMAIL_ADDRESS",
            "name_attr": "emailAddress",
            "tester_type": [ "USERNAME_AND_EMAIL_ADDRESS" ],
            "type_attr": "email"
         }, {
            "autocomplete_attr": "off",
            "field_position": 1,
            "field_signature": "2051817934",
            "id": "7542824740940430359_2051817934_0",
            "label_attr": "Password",
            "last_classification": "UNKNOWN_TYPE",
            "last_correctness": "ignored: ACCOUNT_CREATION_PASSWORD",
            "name_attr": "password",
            "tester_type": [ "ACCOUNT_CREATION_PASSWORD" ],
            "type_attr": "password"
         } ],
         "form_signature": "7542824740940430359"
      } ],
      "site_url": "http://www.example.com"
   } ],
   "stats": {
      "high_level_stats": {
         "fraction_machtes": 0.9565217391304348,
         "matches": 22,
         "mismatches": 1
      },
      "ignored_types_stats": {
         "ACCOUNT_CREATION_PASSWORD": 1,
         "USERNAME_AND_EMAIL_ADDRESS": 1
      },
      "per_type_stats": {
         "ADDRESS_HOME_CITY": {
            "fraction_machtes": 1.0,
            "matches": 2,
            "mismatches": 0
         },
         "ADDRESS_HOME_COUNTRY": {
            "fraction_machtes": 1.0,
            "matches": 1,
            "mismatches": 0
         },
         "ADDRESS_HOME_LINE1": {
            "fraction_machtes": 1.0,
            "matches": 2,
            "mismatches": 0
         },
         "ADDRESS_HOME_LINE2": {
            "fraction_machtes": 1.0,
            "matches": 2,
            "mismatches": 0
         },
         "ADDRESS_HOME_STATE": {
            "fraction_machtes": 1.0,
            "matches": 2,
            "mismatches": 0
         },
         "ADDRESS_HOME_ZIP": {
            "fraction_machtes": 1.0,
            "matches": 2,
            "mismatches": 0
         },
         "CREDIT_CARD_NAME_FULL": {
            "fraction_machtes": 1.0,
            "matches": 3,
            "mismatches": 0
         },
         "CREDIT_CARD_NUMBER": {
            "fraction_machtes": 1.0,
            "matches": 2,
            "mismatches": 0
         },
         "CREDIT_CARD_VERIFICATION_CODE": {
            "fraction_machtes": 1.0,
            "matches": 2,
            "mismatches": 0
         },
         "NAME_FIRST": {
            "fraction_machtes": 1.0,
            "matches": 2,
            "mismatches": 0
         },
         "NAME_LAST": {
            "fraction_machtes": 1.0,
            "matches": 2,
            "mismatches": 0
         },
         "PHONE_HOME_CITY_AND_NUMBER": {
            "fraction_machtes": 0.0,
            "matches": 0,
            "mismatches": 1
         }
      }
   }
}