Natural language (indra.assemblers.english_assembler)

class indra.assemblers.english_assembler.EnglishAssembler(stmts=None)[source]

This assembler generates English sentences from INDRA Statements.

Parameters:stmts (Optional[list[indra.statements.Statement]]) – A list of INDRA Statements to be added to the assembler.
statements

list[indra.statements.Statement] – A list of INDRA Statements to assemble.

model

str – The assembled sentences as a single string.

add_statements(stmts)[source]

Add INDRA Statements to the assembler’s list of statements.

Parameters:stmts (list[indra.statements.Statement]) – A list of indra.statements.Statement to be added to the statement list of the assembler.
make_model()[source]

Assemble text from the set of collected INDRA Statements.

Returns:stmt_strs – Return the assembled text as unicode string. By default, the text is a single string consisting of one or more sentences with periods at the end.
Return type:str