Table of Contents

Search

  1. Preface
  2. Introduction to Data Transformation
  3. Data Processor Transformation
  4. Wizard Input and Output Formats
  5. Relational Input and Output
  6. XMap
  7. Libraries
  8. Schema Object
  9. Command Line Interface
  10. Scripts
  11. Parsers
  12. Script Ports
  13. Document Processors
  14. Formats
  15. Data Holders
  16. Anchors
  17. Transformers
  18. Actions
  19. Serializers
  20. Mappers
  21. Locators, Keys, and Indexing
  22. Streamers
  23. Validators, Notifications, and Failure Handling
  24. Validation Rules
  25. Custom Script Components

Data Transformation User Guide

Data Transformation User Guide

LearnByExample

LearnByExample

The
LearnByExample
searcher component learns how to search for text by examining the text location in the example source document. It uses the Parser format to interpret the source document.
For example, if the Parser has a tab-delimited format,
LearnByExample
counts the number of tabs from the search start to the example text. It searches for text in the source document that lies at the same number of tabs from the start of the search scope.
LearnByExample
is one of the settings of the
value
property of the
Content
anchor. For more information, see Content.
If the
direction
attribute of the
Content
anchor is set to
backward
, the component counts the delimiters from the end of the search scope.
The following table describes the properties of the
LearnByExample
searcher component:
Property
Description
example
Defines the text in the example source document at the anchor location.
The
LearnByExample
searcher component applies heuristics that are sensitive. To use the
LearnByExample
searcher component, the example must have the same form as the expected input. The form must be uniform across the entire input file or files. If the example is not the same as the input, the
LearnByExample
searcher component might fail.