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

Filter relations by project #27

Open
goodmami opened this issue Sep 15, 2020 · 2 comments
Open

Filter relations by project #27

goodmami opened this issue Sep 15, 2020 · 2 comments
Labels
enhancement New feature or request
Milestone

Comments

@goodmami
Copy link
Member

Showing all possible relation all the time can be overwhelming and confusing for someone who is interested in only one wordnet because a large percentage of the relations are irrelevant. We could add some feature to filter out those that are not used by a particular wordnet, perhaps by adding HTML classes, CSS, and a bit of javascript, or through custom builds that use the project information.

@goodmami goodmami added the enhancement New feature or request label Sep 15, 2020
@gconnect
Copy link
Contributor

gconnect commented Nov 5, 2020

How do we go about this? By filter do you mean adding search functionality to the documentation page? And also how do we know the relations that are not used by a particular Wordnet and also what should be the first thing a user sees when he opens the documentation page?

@goodmami
Copy link
Member Author

goodmami commented Nov 9, 2020

One way to do it is to define CSS classes like the following:

.hidden {
    display: none;
}

Then we define which relations are part of which wordnet:

supported_relations = {
  "pwn": ["hypernym", "instance_hypernym", "hyponym", ...],
  "plwn": [...],
  "wnja": [...],
  ...
}

Then when a user selects some wordnet (through a combobox on the page, or a URL parameter, or something), a Javascript function goes through each <article> and adds the .hidden class if the relation is not part of the selected wordnet. If no wordnet is selected (the default), all relations are shown.

Something like that.

@fcbond fcbond added this to the Future Ideas milestone Nov 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants