C3 AI Documentation Home

Text Corpus

Load a directory or nested directory of .txt files into Visual Notebooks. Each file is read as a single row.

Configuration

FieldDescription
Name default=name of an uploaded fileA user-specified node name displayed in the workspace
File RequiredThe file or files to upload
Upload data from a directory or nested directory of text files. Files are stored in a scalable cloud environment with stringent security measures. The total size of all uploaded files must not exceed 15 MB.

Node Inputs/Outputs

InputNone
OutputVisual Notebooks returns a table, called a dataframe, that contains all uploaded data. There is a "filename" column and a "text" column. Both columns are strings.

Description

Figure 1: Example dataframe output

Examples

  • Drag and drop the directory of .txt files that you want to upload into the
    outlined space, or use the "Browse" button to select the directory from your
    computer.
    • The directory shown below is used in this example. Notice that there are
      seven files in the main directory, and an additional three files in the
      "more_data" subdirectory.

Description Description

Figure 2: Example directory of text files

  • Upload the files in the directory then select "Run" to create a dataframe.
    • Notice that each text file becomes a single row in the database, including
      the files in the "more_data" subdirectory.

Description Figure 3: Example dataframe created from a text corpus

Was this page helpful?