cestastanford / grandtour

Apache License 2.0
4 stars 2 forks source link

AND/OR/NOT: winter break task #2

Closed epicfaace closed 5 years ago

quadrismegistus commented 5 years ago

Examples queries:

ceserani commented 5 years ago

Additional examples queries

Show me all travelers who went to Venice but not to Florence Show me all travelers who did not go to Oxford and were statesmen

ceserani commented 5 years ago

Giovanna and Ryan discussed mock-ups in dec 11 meeting; Ryan will produce mock ups by Friday dec 14, discuss them with Giovanna, then submit to Ashwin by Monday 17

quadrismegistus commented 5 years ago

Proposed solution to "NOT" in searches

Example1: "Show me all the statesmen who did not go to Eton"

Step 1: Select statesman

q_statesmen_not_eton

Step 2: Select Eton college

q_statesmen_not_eton_step1

Step 3: Select Eton college AGAIN to make it a negative filter

mockup1

>> This results in the following showing on the bottom above the results

filter_statesman_not_eton

quadrismegistus commented 5 years ago

Proposed solution to AND/OR

Example 2: "Show me merchants who were also collectors (rather than merchants OR collectors)"

This is an intra-filter AND/OR switch.

Step 1: Select merchant and collector

q_collector_or_statesman

Step 2: Go down to filter summary

filter_statesman_or_collector

Step 3: Click the "or" to make it an "and"

filter_statesman_and_collector

Example 3: "Show me travelers who were either statesman or who went to the Royal Society"

This is an inter-filter AND/OR switch.

Step 1: Select "statesman" and "Royal Society"

q_statesman_or_royal_society

Step 2: Go down to filter summary

statesman_and_royal_society

Step 3: Click the "and" to make it an "or"

statesman_or_royal_society

Discussion

Objection: This doesn't resolve issues of ambiguity

One could parse "statesman and Eton or Royal Society" as either

  1. "(statesman and Eton) or (Royal Society)"
  2. "(statesman) and (Eton or Royal Society)"

Solution? Assume right-branching

"statesman and Eton or Royal Society and Member of Parliament" -> (((statesman and Eton) or Royal Society) and Member of Parliament)

The left-most statements are the deepest embedded, and so are prior in a successive, unnesting order.

epicfaace commented 5 years ago

Cool, can we have a call to discuss this and what we're going to accomplish over the break?

epicfaace commented 5 years ago

@ceserani @quadrismegistus The NOT feature is done on the alpha site now, please test it out at https://grand-tour-explorer-2017-alpha.herokuapp.com.

I need to better understand what the numbers next to each of the values means though; not sure if the logic for calculating those needs to be changed with the update for the NOT.

image

ceserani commented 5 years ago

Of the Examples queries submitted on Nov 26:

Show me all the statesmen who did not go to Eton THIS WORKS! Show me merchants who were also collectors (rather than merchants OR collectors) not yet Show me all collectors who never went to Rome not yet Show me all travelers who went to Venice and to Florence not yet