Conversation API

Contextual query reformulation

class datamaestro_text.data.conversation.ContextualizedRewrittenQuery(*, history: List[str], query: str, rewrite: str, dialogue_id: str, query_no: int)

Bases: object

A contextualized query

dialogue_id: str

Conversation identifier

history: List[str]

The list of queries asked by the user

query: str

The last issued query

query_no: int

Question number

rewrite: str

Manually rewritten query

XPM Configdatamaestro_text.data.conversation.ContextualizedQueryRewriting(*, id)

Bases: Base

A dataset composed of

id: str

The unique dataset ID

XPM Configdatamaestro_text.data.conversation.CanardDataset(*, id, path)

Bases: ContextualizedQueryRewriting, File

A dataset in the CANARD json format

id: str

The unique dataset ID

path: Path

The path of the file

iter() Iterator[ContextualizedRewrittenQuery]

Iterates over re-written query with their context