Geodi Data Extraction API - Single Content Recognition Method

Geodi Data Extraction API - Single Content Recognition Method

A Token can be got by Generating a GEODI Token .

RecognizeContent

RecognizeContent

Definition

Returns entries found by scanners in the current workspace from a content sent by the user to GEODI.

Request

[GEODIURL]/DataExtractionHandler?op=RecognizeContent&wsName=[WSNAME]&content=[ContentJson]&UserSession=[TOKEN]

Request 2

[GEODIURL]/DataExtractionHandler?op=RecognizeContent&wsName=[WSNAME]&fileName=[FileName]&UserSession=[TOKEN]

filename and content can be sent as bytes []

Request Url: [GEODIURL]/DataExtractionHandler?op=RecognizeContent&wsName=PROJE&fileName=myProj.doc Request HTTP HEADER : Content-Length:1740 Request : 1740 byte[] Content

HttpMethod

GET, POST

Expected Errors

401 Unauthorized access / Access denied

403 Forbidden

511 Network Authentication Required

501 Server Error

Returning Value

{ "ElapsedMilliseconds":0, "Entries": [ { "OriginalText":"", "Text":"", "StartIndex":0, "Length":1, "Filter":null } ] }
  • ElapsedMilliseconds: ms spent for recognition.

  • Entries: List of entrances recognized by GEODI.

    • OriginalText: A piece of text where recognition occurs

    • Text: The text of the recognition made within the text.

    • StartIndex: OriginalText's starting position within the text. (starting from 0)

    • Length: OriginalText's length

    • Filter: The value created for the entry, if any.

      • StartDouble: The beginning of the value range.

      • EndDouble: End of range.

      • IsFixedValue: Whether the value is constant. False is a range value.

      • RecognizerID: ID of the recognizer that recognizes the word.

      • ValueTypeCode: Enum value corresponding to the value type. The word value type equivalents of these enum values are as follows:

        • 0: Empty

        • 1: Object

        • 2: DBNull

        • 3: Boolean

        • 4: Char

        • 5: SByte (-128, 127)

        • 6: Byte (0, 255)

        • 7: Int16 (-32768, 32767)

        • 8: UInt16 (0, 65535)

        • 9: Int32 (-2147483648, 2147483647)

        • 10: UInt32 (0, 4294967295)

        • 11: Int64 (-9223372036854775808, 9223372036854775807)

        • 12: UInt64 (0, 18446744073709551615)

        • 13: Single

        • 14: Double

        • 15: Decimal

        • 16: DateTime

        • 18: String

Example 1

Request : [GEODIURL]/DataExtractionHandler?op=RecognizeContent { wsName: "PROJECT" content : { ContentURL : '~/MyApplication/Content.php?id=1465', DisplayName:'Control list document', ContentDate:'Mon, 04 May 2015 07:38:28 GMT', ViewURL : '~/MyApplication/ContentView.php?id=1465' } UserSession: "..." }

Example 2

<input id="myFile" type="file"> <script> var GEODIURL="..."; var Token="..." var wsName="..."; function RecognizeMyFile() { var fileData = $("#myFile")[0].files[0]; var url = GEODIURL + "/DataExtractionHandler?op=RecognizeContent"; url += "&fileName=" + UrlEncode(fileData.name); url += "&wsName=" + UrlEncode(wsName); url += "&UserSession=" + UrlEncode(Token); $.ajax({ url: url, type: "POST", data: fileData, cache: false, contentType: false, processData: false, crossDomain: true, timeout:300000, success: function(data) { /// Response }}); } </script>

Example applications