graphite/texpp — pull request #2 by weralwolf (2013-06-03 21:59:04+00:00)
Title: Add post white list for literal transform

Changes in _chrefliterals.cc
/**
* preWhiteList - python dictionary of literals not supposed to be transforms if
* origin match with smthn from this dict
* postWhiteList - python dictionary of literals not supposed to be transform if
* transformation match with smthn from this dict
*/
string normLiteral(string literal,
const WordsDict* wordsDict, const dict& preWhiteList,
const dict& postWhiteList, bool multilang)

example for python code:
literalTags = findLiterals(tag_list, literals, knownNotLiterals,
DictWords, get_stopwords(), {'kurtosiofline': 1}, 0, False)

where 'kurtosiofline' is transformed form of literal which not supposed to be transform.

Test information:

Literal: kurtosis of => kurtosiof
Literal: kurtosis of line => kurtosiofline
--- 'kurtosis of line' is in postProcessingList
Literal: kurtosis of line of => kurtosioflineof