Import text from file

Goal

Import the content of one or more raw text files for further processing with Orange Textable.

Ingredients

Widget Text Files
Icon text_files_icon
Quantity 1

Procedure

Single file

Importing a file using the Text Files widget

Figure 1: Importing the content of a file using the Text Files widget.

  1. Create an instance of Text Files on the canvas.
  2. Open its interface by double-clicking on the created instance.
  3. Make sure the Advanced settings checkbox is not selected.
  4. Click the Browse button to open the file selection dialog.
  5. Select the file you want to import and close the file selection dialog by clicking Ok.
  6. In the Encoding drop-down menu, select the encoding that corresponds to your file.
  7. Click the Send button (or make sure the Send automatically checkbox is selected).
  8. A segmentation covering the file’s content is then available on the Text Files instance’s output connections; to display or export it, see Cookbook: Text output.

Multiple files

Importing several files using the Text Files widget

Figure 2: Importing the content of several files using the Text Files widget.

  1. Create an instance of Text Files on the canvas.
  2. Open its interface by double-clicking on the created instance.
  3. Make sure the Advanced settings checkbox is selected.
  4. If needed, empty the list of imported files by clicking the Clear all button.
  5. Click the Browse button to open the file selection dialog.
  6. Select the files you want to import, making sure they all have the same encoding (you will be able to add files that have other encodings later), then close the file selection dialog by clicking Ok.
  7. In the Encoding drop-down menu, select the encoding that corresponds to the set of selected files.
  8. Click the Add button to add the set of selected files to the list of imported files.
  9. Repeat steps 5 to 8 for adding files in other encoding(s).
  10. Click the Send button (or make sure the Send automatically checkbox is selected).
  11. A segmentation containing a segment covering each imported file’s content is then available on the Text Files instance’s output connections; to display or export it, see Cookbook: Text output.