udapi.block.corefud.indexclusters module

Block corefud.IndexClusters

class udapi.block.corefud.indexclusters.IndexClusters(start=1, prefix='e')[source]

Bases: Block

Re-index the coreference entity IDs (eid). The final entity IDs are of the “e<ID>” form, where <ID> are ordinal numbers starting from the one specified by the start parameter. This block can be applied on multiple documents within one udapy call. For example, to re-index eid in all conllu files in the current directory (keeping the IDs unique across all the files), use: udapy read.Conllu files=’!*.conllu’ corefud.IndexClusters write.Conllu overwrite=1

Parameters:

startint

the starting index (default=1)

prefixstr

prefix of the IDs before the number (default=”e”)

process_document(doc)[source]

Process a UD document