now.data_loading.transform_docarray module#

now.data_loading.transform_docarray.transform_uni_modal_data(documents)[source]#

Transform unimodal Documents into standardized format, which looks like this: Document(

tags={‘color’: ‘red’, ‘author’: ‘me’}, chunks=[

Document(

text=’jina ai’, tags={‘color’: ‘red’, ‘author’: ‘me’}

)

],

)

Return type

DocumentArray

now.data_loading.transform_docarray.transform_multi_modal_data(documents, field_names, search_fields)[source]#

Transforms multimodal data into standardized format, which looks like this: Document(

tags={‘color’: ‘red’, ‘author’: ‘me’}, chunks=[

Document(

text=’jina ai’, tags={‘color’: ‘red’, ‘author’: ‘me’}

), Document(

uri=’pic.jpg’, tags={‘color’: ‘red’, ‘author’: ‘me’}

),

],

)

now.data_loading.transform_docarray.transform_docarray(documents, search_fields)[source]#

Gets either multimodal or unimodal data and turns it into standardized format.

Parameters
  • documents (Union[Document, DocumentArray]) – Data to be transformed.

  • search_fields (List[str]) – Field names for neural search. Only required if multimodal data is given.

Return type

DocumentArray