{'fraction_non_alphanumeric': 0.014365522745411013, 'fraction_numerical': 0.0, 'mean_word_length': 5.463917525773196, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Ordinal Constraint Satisfaction

We propose a new CSP formalism that incorporates hard constraints and preferences so that the two are easily distinguished both conceptually and for purposes of problem solving. Preferences are represented as a lexicographic order over variables and domain values, respectively. Constraints are treated in the usual manner. Therefore, these problems can be solved with ordinary CSP algorithms, with the proviso that complete algorithms cannot terminate search after finding a feasible solution, except in the important case of heuristics that follow the preference order (lexical order). We discuss the relation of this problem representation to other formalisms that have been applied to preferences, including soft constraint formalisms and CP-nets. We show how algorithm selection can be guided by work on phase transitions, which serve as a useful marker for a reversal in relative efficiency of lexical ordering and ordinary CSP heuristics due to reduction in number of feasible solutions. We also consider branch and bound algorithms and their anytime properties. Finally, we consider partitioning strategies that take advantage of the implicit ordering of assignments in these problems to reduce the search space.