| |
Methods defined here:
- __init__(self, data=None, text_column=None, accumulate=None, data_sequence_column=None, data_order_column=None)
- DESCRIPTION:
The SentenceExtractor function extracts sentences from English input text. A
sentence ends with a punctuation mark such as period (.), question
mark (?), or exclamation mark (!).
PARAMETERS:
data:
Required Argument.
The input teradataml DataFrame that contains the input texts.
data_order_column:
Optional Argument.
Specifies Order By columns for data.
Values to this argument can be provided as a list, if multiple
columns are used for ordering.
Types: str OR list of Strings (str)
text_column:
Required Argument.
Specifies the name of the input column that contains the text from
which to extract sentences.
Types: str
accumulate:
Optional Argument.
Specifies the names of the input columns to copy to the output.
Types: str OR list of Strings (str)
data_sequence_column:
Optional Argument.
Specifies the list of column(s) that uniquely identifies each row of
the input argument "data". The argument is used to ensure
deterministic results for functions which produce results that vary
from run to run.
Types: str OR list of Strings (str)
RETURNS:
Instance of SentenceExtractor.
Output teradataml DataFrames can be accessed using attribute
references, such as SentenceExtractorObj.<attribute_name>.
Output teradataml DataFrame attribute name is:
result
RAISES:
TeradataMlException
EXAMPLES:
# Load the data to run the example.
load_example_data("SentenceExtractor","paragraphs_input")
# Create teradataml DataFrame objects
paragraphs_input = DataFrame.from_table("paragraphs_input")
# Example1 -
sentenceextractor_out = SentenceExtractor(data=paragraphs_input,
text_column='paratext',
accumulate=['paraid','paratopic'],
data_sequence_column='paraid'
)
# Print the results
print(sentenceextractor_out.result)
- __repr__(self)
- Returns the string representation for a SentenceExtractor class instance.
- get_build_time(self)
- Function to return the build time of the algorithm in seconds.
When model object is created using retrieve_model(), then the value returned is
as saved in the Model Catalog.
- get_prediction_type(self)
- Function to return the Prediction type of the algorithm.
When model object is created using retrieve_model(), then the value returned is
as saved in the Model Catalog.
- get_target_column(self)
- Function to return the Target Column of the algorithm.
When model object is created using retrieve_model(), then the value returned is
as saved in the Model Catalog.
- show_query(self)
- Function to return the underlying SQL query.
When model object is created using retrieve_model(), then None is returned.
|