LanguageDetectorOptions.fromAssetPath constructor

LanguageDetectorOptions.fromAssetPath(
  1. String assetPath, {
  2. ClassifierOptions classifierOptions = const ClassifierOptions(),
})

Convenience constructor that looks for the model asset at the given file system location.

Implementation

factory LanguageDetectorOptions.fromAssetPath(
  String assetPath, {
  ClassifierOptions classifierOptions = const ClassifierOptions(),
}) {
  return LanguageDetectorOptions(
    baseOptions: BaseOptions.path(assetPath),
    classifierOptions: classifierOptions,
  );
}