RecogniContact/COM - International Address Parser - Class IParserSettings
Overview
Using RecogniContact
Deploying RecogniContact
Class IContactParser
Class IParsedContact
Class IParserSettings
Sample code for C#
Sample code for C++
Sample code for Delphi
Sample code for Visual Basic (win32)
Sample code for Visual Basic .NET

Class IParserSettings

Class IParserSettings contains the settings that control the parsing process (= the call to IContactParser.Parse() )

To modify these settings proceed as follows
  1. Create the settings object:
    settingsObject = IContactParser.CreateSettingsObject()
  2. Change the settings object properties as required.
  3. Activate the settings using
    IContactParser.Settings(settingsObject);
See below for a list of source code samples.

Properties

public bool TranslateExistingCountryNames;
If True, the Parser will translate the name of the country in a postal address to the language specified in CountryNameLanguage

public Language CountryNameLanguage;
Language in which the country name should be added.

Language_DA - Danish
Language_DE - German
Language_EN - English
Language_FI - Finnish
Language_FR - French
Language_IT - Italian
Language_NL - Dutch
Language_SE - Swedish
Language_SP - Spanish

public bool StandardizePhoneNumberFormat;
If True, the parser will standardize phone number formats.

public string NationalPhonePrefixFormat;
Format for local area prefixes in phone numbers, when the phone number is national only (= does not include a country code).
Does not apply to countries without local area prefixes (e.g. France)

Use a series of digits, e.g. 012, to represent the local area code.
Use _ to represent a white space.
Any other character will be literally included in the phone number.

Examples:
(012)
(012)_
012/
012_/_
012_
012

public string InternationalPhoneNumber_IntlAccessCode;
Specifies how the international access code should be represented in the phone number.

Examples:
++ as in ++49 30 5555555
00 as in 0049 30 5555555 (International access code used throughout Europe)
011 as in 001 49 30 5555555 (International access code used in Canada and the USA)

public string InternationalPhonePrefixFormat;
Format of the area code in international telephone numbers (numbers, which contain a country code)
Does not apply to countries without local area prefixes (e.g. France)

Use a series of digits, e.g. 123, to represent the local area code.
Use _ to represent a white space.
Any other character will be literally included in the phone number.

Examples:
123 to get +4930555555
_123_ to get +49 30 5555555

public bool RemoveSpaces;
If True, white spaces in a parsed telephone number will be removed.

public bool RemoveOptionalCharacters;
If True, all characters that are no numbers, will be removed from the telephone number.

public string InternationalAccessCodeList;
A string containing telephone number prefixes, that are considered international access codes.

Examples:
for Europe: 00 + ++
for the USA + Canada: 011 + ++

public bool DetectMobilePhones;
If True, the parser will detect if a telephone number has a mobile network prefix. If a mobile network prefix is found, the phone number will automatically be assigned to the MobilePhone property of the parsed contact, even if no mobile phone marker (Mobile:, GSM:, etc.) is present.

public bool MakeAllPhoneNumbersInternational;
If True, a country code will be added to the phone number if it does not contain one already.
The country code to add will be determined from country information present in the postal address, email address and website address.
Use the following properties to specify, which information can be used to determine the country.

public bool UseCountryFromEmail;
If True, the parser will extract country information from country domains in email addresses.

Example:
loquisoft.de -> Country = Germany
Country information will be used to standardize phone numbers.

public bool UseCountryFromUrl;
If True, the parser will extract country information from country domains in website addresses.
loquisoft.de -> Country = Germany
Country information will be used to standardize phone numbers.

public bool UseCountryFromPlaceName;
If True, the parser will use the place name database to automatically identify the country of a postal address.

public bool UseCountryFromPhoneFax;
If True, the parser will extract country information from telephne numbers with international access codes.

Example:
+49 30 5555555 -> Country = Germany

public bool ExtractNameFromEmail;
If True, the parser will extract a person's first and last name from an email address if it has the form firstname.lastname@... or firstname_lastname@....
This rule is only used if the person's first name is one of about 20.000 first names known to RecogniContact.

public Country MakeAllPhoneNumbersInternational_DefaultCountry;
Set to true to add a Default country code to telephone numbers, if no country information was found in the parsed data.
Country is an enumerated type representing countries, in which each constant is named Country_XX. XX stands for any of the 2 letter ISO country codes on http://www.iso.org/iso/english_country_names_and_code_elements.

Example:
Country_US - USA
Country_DE - Germany
Country_FR - France
Country_GB - United Kingdom

NOTE: the 2 letter ISO country code is identical to the country code in website and email addresses, with the only exception of
Country_GB - United Kingdom

Demo

For a demo see the following source code samples: