TextProofreader

public class TextProofreader implements Closeable


Performs proofreading on text.

Summary

Nested types

Interface for receiving proofreading results.

Holds the configuration for creating a TextProofreader instance.

Builder for TextProofreaderOptions.

Public methods

void
static TextProofreader

Creates a TextProofreader instance from TextProofreaderOptions.

TextProofreaderResult

Performs proofreading on the input text.

void

Performs asynchronous proofreading on the input text.

Public methods

close

public void close()

createFromOptions

public static TextProofreader createFromOptions(
    Context context,
    TextProofreader.TextProofreaderOptions options
)

Creates a TextProofreader instance from TextProofreaderOptions.

Parameters
Context context

The Android context.

TextProofreader.TextProofreaderOptions options

The configuration options.

Returns
TextProofreader

A TextProofreader instance.

proofread

public TextProofreaderResult proofread(String text)

Performs proofreading on the input text.

Parameters
String text

The input text to be proofread.

Returns
TextProofreaderResult

The proofreading result.

proofreadStreaming

public void proofreadStreaming(
    String text,
    TextProofreader.ProofreaderResultCallback callback
)

Performs asynchronous proofreading on the input text.

Parameters
String text

The input text to be proofread.

TextProofreader.ProofreaderResultCallback callback

The callback to receive the results.