TEXT_VIEW
The TEXT_VIEW node creates a text visualization for a given TextBlob DataContainer type.Inputs
------
default : TextBlob
The DataContainer to be visualized in text formatParams:prettify : BooleanWhether to prettify the displayed text (defaults to True)Returns:out : TextBlobThe DataContainer containing text data
Python Code
import pprint
from flojoy import flojoy, TextBlob
@flojoy
def TEXT_VIEW(default: TextBlob, prettify: bool = False) -> TextBlob:
"""The TEXT_VIEW node creates a text visualization for a given TextBlob DataContainer type.
Inputs
------
default : TextBlob
The DataContainer to be visualized in text format
Parameters
----------
prettify : Boolean
Whether to prettify the displayed text (defaults to True)
Returns
-------
TextBlob
The DataContainer containing text data
"""
s = default.text_blob
if prettify:
s = pprint.pformat(default.text_blob)
return TextBlob(s)
Example
Having problem with this example app? Join our Discord community and we will help you out!
This example shows the function of the TEXT_VIEW
node. It print TEXT_BLOB
data type such as from the TEXT
node.