ProcessText web-method


ProcessText web-method should be used for processing text with LinguLab API. Web-method requires HTML text for processing, configuration identifier and authentication key. Search keywords are optional. Language key should be set but if it does not set default language will be used for processing.

Web-method returns ProcessTextResult object with includes result identifier, text measure (integer value from 0 to 10), HTML of measure image with details and link to processing details page. Text can be optimized on LinguLab web site. In case of error occurred ErrorCode and ErrorMessage contain information about error.
"lingulabCustom" attribute can be used for storing custom data of tag for future parsing on client side. Current attribute will not be removed from html when text edited (See example in "GetResult web-method" chapter).

HTML of measure image with details can look like:
LinguLab measure result


inputData ProcessTextData required
authenticationKey string required


ProcessTextData properties

ResultKey integer optional
Text string required
ConfigurationId string optional, default text genre will be used.
LanguageKey string optional, default language will be used.
SearchKeyword1 string optional
SearchKeyword3 string optional
SearchKeyword3 string optional
SectionTypeSettings SectionTypeSetting optional
BackUrl BackUrlData optional
PanelSetting ResultPanelSetting optional


SectionTypeSetting properties

BulletList ListSetting required
Headline string required
NumberList ListSetting required
SubHeadline string required
Teaser string required
Text string required


BackUrlData properties

BackUrl string optional
BackTitle string optional
BackAndSaveUrl string optional
BackAndSaveTitle string optional


ResultPanelSetting properties

PositionMode PanelMode required, values: Bottom, Left
IsAllModulesDisplayed boolean required
IsMetaGroupsShowsAlways boolean required
IsHideStars boolean required


Processing text format

Processing text tags will be transformed by default in following way (all html tags will be scraped from processing text except this list):
  • h1 - headline
  • h2 - subheadline
  • h3 - teaser
  • p - text
  • ul - bullet list
  • ol - number list
Other html tag will be processed as Unknown.

API client can provide custom section type settings with SectionTypeSetting property of ProcessTextData parameter. The property is optional. In case this property is not set default settings will be used. Example of custom settings (C#):
inputData.SectionTypeSettings = new SectionTypeSetting();
inputData.SectionTypeSettings.Headline = "h1";
inputData.SectionTypeSettings.SubHeadline = "h2";
inputData.SectionTypeSettings.Teaser = "h3";
inputData.SectionTypeSettings.Text = "p";
inputData.SectionTypeSettings.BulletList = new ListSetting();
inputData.SectionTypeSettings.BulletList.ItemTag = "li";
inputData.SectionTypeSettings.BulletList.ListTag = "ul";
inputData.SectionTypeSettings.NumberList = new ListSetting();
inputData.SectionTypeSettings.NumberList.ItemTag = "li";
inputData.SectionTypeSettings.NumberList.ListTag = "ol";
The character length of processing text cannot be more than allowed for current user account role.

Back Url can be set as property of inputData parameter:
inputData.BackUrl = new BackUrlData()
BackUrl = "{resultKey}",
BackTitle = "Back to my website",
BackAndSaveUrl = "{resultKey}",
BackAndSaveTitle = "Save And Close"

Error codes

  • 0: Succeed;
  • 131: Authentication failed;
  • 132: Authentication key was expired;
  • 133: Lack of permission;
  • 230: Wrong parameter. Some fields in input data are missed, detailed information should be provided in error message;
  • 231: Processing text length error;
  • 232: Getting configuration file failed;
  • 233: Wrong language;
  • 330: Internal error;
  • 331: Storing data failed.

Request and response