I'm creating a dataset at the moment from a relational database and I'd like the lexeme IDs to be the primary keys from the database. I assumed that if I specified ID=x in the add_forms* call, then the ID would be kept, however, the code always calls self.lexeme_id:
|
def lexeme_id(self, kw): |
|
self._count[(kw['Language_ID'], kw['Parameter_ID'])] += 1 |
|
return '{0}-{1}-{2}'.format( |
|
kw['Language_ID'], |
|
kw['Parameter_ID'], |
|
self._count[(kw['Language_ID'], kw['Parameter_ID'])]) |
Can we make lexeme_id be ignored if ID is given?
I'm creating a dataset at the moment from a relational database and I'd like the lexeme IDs to be the primary keys from the database. I assumed that if I specified
ID=xin the add_forms* call, then the ID would be kept, however, the code always callsself.lexeme_id:pylexibank/src/pylexibank/cldf.py
Lines 115 to 120 in 8ae170c
Can we make lexeme_id be ignored if
IDis given?