Order consistently
This commit is contained in:
parent
4cb5163bc9
commit
64a32a0739
@ -41,7 +41,16 @@ class Translator:
|
|||||||
self.processTerm(groups, **df)
|
self.processTerm(groups, **df)
|
||||||
|
|
||||||
definitions = groups.values()
|
definitions = groups.values()
|
||||||
definitions = sorted(definitions, key=lambda d: (len(d['source']), 'P' in d['tags'], -len(d['rules'])), reverse=True)
|
definitions = sorted(
|
||||||
|
definitions,
|
||||||
|
reverse=True,
|
||||||
|
key=lambda d: (
|
||||||
|
len(d['source']),
|
||||||
|
'P' in d['tags'],
|
||||||
|
-len(d['rules']),
|
||||||
|
d['expression']
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
length = 0
|
length = 0
|
||||||
for result in definitions:
|
for result in definitions:
|
||||||
|
Loading…
Reference in New Issue
Block a user