name: preprocess
description: Performs the IOB preprocessing.
inputs:
- {name: Input 1 URI, type: GCSPath}
- {name: Output x URI template, type: GCSPath}
- {name: Output y URI template, type: GCSPath}
- {name: Output preprocessing state URI template, type: GCSPath}
outputs:
  - name: Output x URI
    type: GCSPath
  - name: Output y URI
    type: String
  - name: Output tags
    type: String
  - name: Output words
    type: String
  - name: Output preprocessing state URI
    type: String
implementation:
  container:
    image: gcr.io/<PROJECT-ID>/kubeflow/ner/preprocess:latest
    command: [
      python3, /pipelines/component/src/component.py,
      --input1-path,                        {inputValue: Input 1 URI},
      --output-y-path,                      {inputValue: Output y URI template},
      --output-x-path,                      {inputValue: Output x URI template},
      --output-preprocessing-state-path,    {inputValue: Output preprocessing state URI template},

      --output-y-path-file,                     {outputPath: Output y URI},
      --output-x-path-file,                     {outputPath: Output x URI},
      --output-preprocessing-state-path-file,   {outputPath: Output preprocessing state URI},
      --output-tags,                            {outputPath: Output tags},
      --output-words,                           {outputPath: Output words},
    ]