About Extended Linguistic Services
Extended Linguistic Services (ELS) is implemented as a dynamic-link library (DLL) that provides a variety of linguistic support functionality for text that the application specifies. The technology includes the ELS platform and plug-ins for several predefined linguistic service types accessible to the application through the platform.
The ELS platform is the interface between your application and the ELS services. It provides a simple way to implement several kinds of linguistic functionality through the same API, which allows the application to access and use specific services. For more information about the API, see Extended Linguistic Services Reference.
The platform runs inside the application virtual memory space, and all allocated memory is part of this space. Thus your application only needs to link to the ELS component DLL (Elscore.dll) by linking to Elscore.lib or by dynamically loading Elscore.dll.
For Windows 7 and later, the ELS platform supports only the following predefined services.
Each service is associated with a service category describing what the service does. The category is represented by a nonlocalizable string. It is used by applications to enumerate available services. The current service categories are:
- "Language Detection"
- "Script Detection"
The platform uses service metadata to enumerate the services requested by the application. Properties such as the service globally unique identifier (GUID), supported input and output languages and scripts, and the service category can be used by the application to enumerate the desired ELS services.
Each ELS service is implemented as a plug-in supported by a DLL that can be installed on the operating system so that the ELS platform can detect and use it. Services can expose their own subservices, if required.
This section describes the main operations supported by the ELS platform. The platform supports both synchronous and asynchronous calling modes. The asynchronous calling mode uses an application thread pool to schedule threads for processing requests.
The ELS platform loads and manages all ELS services, making operation transparent to the application. The application enumerates the available services by calling MappingGetServices. For programming instructions, see Enumerating and Freeing Services.
After service enumeration, the application calls the MappingRecognizeText function to use a particular ELS service to map any text range of input text to output text. An example of text recognition is the use of a language detection service that receives a text segment and detects its most probable language.
After the service has recognized the text, MappingRecognizeText returns with a MAPPING_PROPERTY_BAG structure populated with output data and properties produced by the service. To avoid memory leaks, the application must free the property bag by calling MappingFreePropertyBag for each time that the MappingRecognizeText returns S_OK. Usually the application does this either when it finishes using the output data or when the output data is no longer relevant because the input region of text has been modified, for example, edited or deleted. When the property bag is released, MappingFreePropertyBag returns.
Programming instructions for text recognition are provided in Requesting Text Recognition.
Future versions of ELS will allow the ELS services to be updated. The application will be able to check the version numbers of the MAPPING_SERVICE_INFO structure to detect any changes in the services.