Prerequisites
- Make sure your assets exist in CDF.
-
Check for SHX text embedded in the diagram file. If present, set
configuration.annotationExtract = Trueto override overlapping OCR text. For more information, see API documentation. -
Ensure the asset names (or any other fields in use) match the tags in the file. If they don’t match, do the following:
- Create an alias for the asset name to better match the tags in the file.
-
Set
partialMatchandminTokens.
Tags are recognized incorrectly
-
I is recognized as T. For example, PI/TI is recognized as PT/TT
PI/TI tags often don’t exist in the asset hierarchy; if they do, PT/TT tags may be their closest relatives. By default, we correct
ItoTif misread. Use configuration substitutions to turn this off. -
Wildcard tags are being linked to multiple tags
Add aliases to tags during diagram detection. For example, if
11-V-6x66should link to both11-V-6166and11-V-6666, add11-V-6x66as an alias. The entities field looks like this: - Only a subset of the tag is recognized Follow the steps in Tags are not recognized section to resolve this issue.
-
Large bounding box with widely spaced characters causes incorrect detection
Set
connectionFlags= ["natural_reading_order", "no_text_inbetween"]. See API documentation for more information. -
Short false positives
Set
configuration.customizeFuzziness.minChars. See API documentation for more information.
Tags are not recognized
Use the OCR endpoint to see the raw OCR detection results. For more information, see the existing OCR API endpoint. Currently, the SDK is not available. Use the Python code below in the Cognite Jupyter Notebook.configuration.
For example, if there are unexpected leading or trailing characters, replace the leading or trailing characters with an empty string “”.