clld / glottolog3

glottolog2 re-implemented as CLLD app
MIT License
112 stars 27 forks source link

Search for languages whose name is 3 characters long #43

Closed Glottotopia closed 9 years ago

Glottotopia commented 9 years ago

Languages which have a name consisting of exactly three characters can currently not be searched because the search string is interpreted as an ISO code in those cases. However, it would be useful to find those languages based on a name search as well

xrotwang commented 9 years ago

True. Language names with just one character are problematic, too. We will have to find a better way to reconcile convenience with accuracy.

Bibiko commented 9 years ago

On 02 Jul 2015, at 14:12, Robert Forkel notifications@github.com wrote:

True. Language names with just one character are problematic, too. We will have to find a better way to reconcile convenience with accuracy.

Maybe by this approach:

and

iso=bar or i=bar

This would avoid clicking at any checkboxes etc.

Best, H


Hans-Joerg Bibiko Max Planck Institute for the Science of Human History Department of Linguistic and Cultural Evolution / Room 111 Kahlaische Str. 10 phone: +49 (0) 3641 686 871 D-07745 Jena fax: +49 (0) 3641 686 990 Germany e-mail: bibiko [at] shh.mpg.de


Glottotopia commented 9 years ago

Since the number of languages with exactly three chars is very small, a rather hackish approach:

Not elegant, but should conform to the principle of least surprise Best Sebastian

On 02.07.2015 14:19, Hans-Jörg Bibiko wrote:

On 02 Jul 2015, at 14:12, Robert Forkel notifications@github.com wrote:

True. Language names with just one character are problematic, too. We will have to find a better way to reconcile convenience with accuracy.

Maybe by this approach:

  • default 3 letters are recognised as ISO
  • if one wants to look for a lg having 1, 2, or 3 letters then allow this: name=foo or n=foo

and

iso=bar or i=bar

This would avoid clicking at any checkboxes etc.

Best, H


Hans-Joerg Bibiko Max Planck Institute for the Science of Human History Department of Linguistic and Cultural Evolution / Room 111 Kahlaische Str. 10 phone: +49 (0) 3641 686 871 D-07745 Jena fax: +49 (0) 3641 686 990 Germany e-mail: bibiko [at] shh.mpg.de



Reply to this email directly or view it on GitHub: https://github.com/clld/glottolog3/issues/43#issuecomment-118012446

Bibiko commented 9 years ago

agree, but the user should be notified that the result is either based on ISO or name. I do not know if there're instances where a 3 letter ISO code is a 3 letter lg name and visa versa ? One also could think of interpreting "foo" (lit. a name wrapped by double-quotes) as: please look for a name, since this "quoting" is known from Google

xflr6 commented 9 years ago

There is actually a special handling in the quick-search for that (has been discussed earlier): If you upper-case the first letter (e.g. Hoa), it searches for names instead of the ISO-code.

You can of course also use the normal seach function, which also searches for languoids down to two-letter names (e.g. Ti).

Glottotopia commented 9 years ago

if you use the search box at the upper right corner and you search for "abu", you will not find the language Abu.

I like the solution with the capital letters, but I guess few users would expect this field to be case sensitive, as most search engines aren't.

SN

On 02.07.2015 14:49, Sebastian Bank wrote:

There is actually a special handling in the quick-search for that (has been discussed earlier): If you upper-case the first letter (e.g. Hoa), it searches for names instead of the ISO-code.

You can of course also use the normal seach function, which also searches for languoids down to two-letter names (e.g. Ti).


Reply to this email directly or view it on GitHub: https://github.com/clld/glottolog3/issues/43#issuecomment-118022165

Bibiko commented 9 years ago

at least 414 language names (out of 504) which have 3 letters are valid ISO codes - this is not "a few" ;) - maybe one can check within the "quick search" function if the search term has 3 letters then differentiate these 4 conditions: 1) term is a valid name and not a valid iso code => filter by name 2) term is a valid iso code and not a valid name => filter by iso 3) term is a valid name and a valid iso code => show list of both 4) term is not a valid name and not a valid iso code => show nothing

Bibiko commented 9 years ago

in addition if the search term has less than 3 letters then search within the "name" column for an exact match (instead of containing search string) - but this should be mentioned to the user

xrotwang commented 9 years ago

@Bibiko The behaviour so far has been to search for the search term anywhere within a name, i.e. infix search. So your proposal is not backwards compatible with what is happening now, which I think presents a usability problem as well.

xrotwang commented 9 years ago

I think it will not be possible to meet all search requirements with just the quicksearch box. That's why we still have the L-Search after all. With the fix proposed in issue #47 the L-Search will work for the cases mentioned by @Glottotopia so I'd say we implement this and try to highlight the existence of the L-Search, maybe by renaming it Language Search in the main menu.