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

A list of INDRA Statements to assemble.

Type:list[indra.statements.Statement]
model

The assembled sentences as a single string.

Type:str
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