MITRE “index cards” (indra.assemblers.index_card.assembler)

class indra.assemblers.index_card.assembler.IndexCardAssembler(statements=None, pmc_override=None)[source]

Assembler creating index cards from a set of INDRA Statements.

Parameters
  • statements (list) – A list of INDRA statements to be assembled.

  • pmc_override (Optional[str]) – A PMC ID to assign to the index card.

statements

A list of INDRA statements to be assembled.

Type

list

add_statements(statements)[source]

Add statements to the assembler.

Parameters

statements (list[indra.statement.Statements]) – The list of Statements to add to the assembler.

make_model()[source]

Assemble statements into index cards.

print_model()[source]

Return the assembled cards as a JSON string.

Returns

cards_json – The JSON string representing the assembled cards.

Return type

str

save_model(file_name='index_cards.json')[source]

Save the assembled cards into a file.

Parameters

file_name (Optional[str]) – The name of the file to save the cards into. Default: index_cards.json