Skip to content

Commit

Permalink
Remove problematic string_non_nominal soft constraint.
Browse files Browse the repository at this point in the history
  • Loading branch information
haldenl committed May 10, 2019
1 parent 9fc66b7 commit d89bc0b
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 8 deletions.
1 change: 0 additions & 1 deletion asp/assign_weights.lp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ soft_weight(same_field_gte3,same_field_gte3_weight).
soft_weight(count_twice,count_twice_weight).
soft_weight(shape_cardinality,shape_cardinality_weight).
soft_weight(number_nominal,number_nominal_weight).
soft_weight(string_non_nominal,string_non_nominal_weight).
soft_weight(bin_cardinality,bin_cardinality_weight).
soft_weight(quant_bin,quant_bin_weight).
soft_weight(agg_dim,agg_dim_weight).
Expand Down
5 changes: 0 additions & 5 deletions asp/soft.lp
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@ soft(shape_cardinality,E) :- channel(E,shape), discrete_cardinality(E,C), C > 5.
% @constraint Numbers should not be nominal.
soft(number_nominal,E) :- type(E,nominal), field(E,F), fieldtype(F,number).

% @constraint Prefer nominal string fields
soft(string_non_nominal,E) :- type(E,ordinal), field(E,F), fieldtype(F,string).
soft(string_non_nominal,E) :- type(E,temporal), field(E,F), fieldtype(F,string).
soft(string_non_nominal,E) :- type(E,quantitative), field(E,F), fieldtype(F,string).

% @constraint Binned quantitative field should not have too low cardinality.
soft(bin_cardinality,E) :- type(E,quantitative), bin(E,_), enc_cardinality(E,C), C < 15.

Expand Down
1 change: 0 additions & 1 deletion asp/weights.lp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#const count_twice_weight = 50.
#const shape_cardinality_weight = 5.
#const number_nominal_weight = 10.
#const string_non_nominal_weight = 2.
#const bin_cardinality_weight = 5.
#const quant_bin_weight = 1.
#const agg_dim_weight = 2.
Expand Down
2 changes: 1 addition & 1 deletion draco/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def main(): # pragma: no cover
else:
logger.info(f"Processing query: {args.query.name} ...")
if args.type == QueryType.asp:
draco_query = args.query.read().split('\n')
draco_query = args.query.read().split("\n")
else:
query_spec = json.load(args.query)
d = args.base or os.path.dirname(args.query.name)
Expand Down

0 comments on commit d89bc0b

Please sign in to comment.