trains a ContentDetectorFunction[…] based on the examples given.
Details and Options
- TrainTextContentDetector attempts to train an entity detector using the provided training data.
- TrainTextContentDetector is typically used to create a custom tagging function for text, with only limited training data.
- TrainTextContentDetector returns a ContentDetectorFunction[…] that can then be applied to new input texts.
- The spans spani should be given as lists with starting and ending positions.
- The classes classi can be arbitrary expressions.
- TrainTextContentDetector[…][text] can be used to detect objects in text and returns the result as a list of associations of the form <|"String"str,"Class"class|>.
- TrainTextContentDetector supports the following options:
PerformanceGoal Automatic favor settings with specific advantages ProgressReporting Automatic how to report progress during training RandomSeeding 1234 how to seed pseudorandom generators internally TargetDevice "CPU" the target device on which to perform training TimeGoal Automatic number of seconds to train for ValidationSet None the set of data on which to evaluate the model during training
Examplesopen allclose all
Use PerformanceGoal"Quality" to emphasize the quality of the result:
Use PerformanceGoal"Speed" to emphasize the speed of computation:
By default, progress is reported in a panel:
Use ProgressReportingFalse to avoid displaying the progress panel:
The training time can be influenced by several factors, such as the number of examples and classes:
Use TimeGoal to specify a target time for the training:
By default, no validation is performed on the detector. Use ValidationSet to provide validation data:
Wolfram Research (2021), TrainTextContentDetector, Wolfram Language function, https://reference.wolfram.com/language/ref/TrainTextContentDetector.html.
Wolfram Language. 2021. "TrainTextContentDetector." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/TrainTextContentDetector.html.
Wolfram Language. (2021). TrainTextContentDetector. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/TrainTextContentDetector.html