Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search nutrimatic / onelook / ??? for fill #32

Closed
mooomooo opened this issue Jun 4, 2024 · 8 comments
Closed

Search nutrimatic / onelook / ??? for fill #32

mooomooo opened this issue Jun 4, 2024 · 8 comments

Comments

@mooomooo
Copy link

mooomooo commented Jun 4, 2024

In place of / to supplement a custom lexicon (#3), it might be nice to have the ability to directly search nutrimatic / onelook for fill that match the currently filled in length and crossers. Perhaps a button to append the search results to the list from the lexicon, or a separate tab in the word list, or just additional entries in the "research" tab?

Thanks for this amazing tool!

@viresh-ratnakar
Copy link
Owner

viresh-ratnakar commented Jun 4, 2024

Thanks! Yes, that's a very good idea. Thinking aloud a bit about the details (inputs from anyone are welcome): Nutrimatic results in general will be low-precision/high-recall (as many/most of the phrase matches will not be usable), so I wouldn't want to just mix them into the lexicon matches. I think additional entries in the "Research" tab seems like the easiest thing to do as well as the right way to do it.

@viresh-ratnakar
Copy link
Owner

BTW: there are many times when it would be nice to get weigh-ins from more users, and I find that rarely happening on GitHub Issue/Discussion area. So I've now created a Google Group. Do consider joining: https://groups.google.com/g/exolve-exet-etc

@mooomooo
Copy link
Author

mooomooo commented Jun 4, 2024

(Github is easier for me than Google Groups) From the group:

I am thinking of removing the "Clear light" button that is currently shown in the Exet tab, above the grid-fill choices. I will add it to the Edit menu. The keyboard short-cut (Ctrl-q) will continue to work. I am thinking of using that space to offer a choice of fetching grid-fill matches from sources such as Nutrimatic and Onelook (to supplement what you get from the lexicon: see #32).

I think this sounds like a better idea actually, though probably more work -- it makes more sense for the words to show up in this tab than under "Research". I do see your point about not mixing results though, so maybe the word list choices box could be made to have separate tabs for lexicon / nutrimatic / onelook matches?

@viresh-ratnakar
Copy link
Owner

viresh-ratnakar commented Jun 5, 2024 via email

@viresh-ratnakar
Copy link
Owner

Ah, I just realized (I have had the same realization many times :-)), that I can't really access the data returned by nutrimatic, from within Exet (as it's cross-domain data). So, I cannot mix the results into the lexicon results anyway. Moreover, I can't enable click-to-select on those nutrumatic results. At best, I can show them in an iframe (just like I do for Hidden/Alternations).

It probably still makes sense to initiate the action of getting fill choices from other sources from the main Exet tab itself, probably a button called "Web sources" that replaces the "Clear light" button. I'll make a modal iframe appear, in which you can see nutrimatic and onelook results.

@mooomooo
Copy link
Author

mooomooo commented Jun 5, 2024

it's cross-domain data

Hm parsing the response to a GET request works just fine locally (the returned webpage has a list of <span>s), but it looks like nutrimatic doesn't set a CORS header, so browsers balk at the XHR. I assume there's no straightforward workaround? I guess if not then your proposed iframe solution is the best we can hope for, at least unless PuzzleTechHub/nutrimatic#17 gets some traction.

@viresh-ratnakar
Copy link
Owner

This has been implemented now in Exet v0.92.

0a7ad24

@mooomooo
Copy link
Author

mooomooo commented Jun 9, 2024

I tried it out; it looks and works great! Thanks for this!

@mooomooo mooomooo closed this as completed Jun 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants