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

Metadata: Allow single quotes in keywords #1196

Closed
dror3go opened this issue Apr 15, 2021 · 6 comments
Closed

Metadata: Allow single quotes in keywords #1196

dror3go opened this issue Apr 15, 2021 · 6 comments
Assignees
Labels
idea Feedback wanted / feature request released Available in the stable release

Comments

@dror3go
Copy link

dror3go commented Apr 15, 2021

In some languages, acronyms are written with a quotation mark.
When PhotoPrism is getting a photo's location details to set its title and keywords, it currently splits a phrase into two separate keywords when it finds a quotation mark. This leaves some of my photos with a 1 letter keyword and other useless keywords.

I'm not sure if this should be language-based, but it seems to me that we need some sort of logic change when setting keywords.

@graciousgrey graciousgrey added the idea Feedback wanted / feature request label Apr 20, 2021
@graciousgrey
Copy link
Member

@dror3go could you name us some examples?

Language based improvements for titles, keywords etc are a bit more complex. We know there is room for improvement and will probably implement it at one point but at the moment we have some more important tasks to work on.

@lastzero lastzero self-assigned this May 5, 2021
@lastzero lastzero changed the title Quotation mark should not split a keyword in all situations Metadata: Allow single quotes in keywords May 5, 2021
@lastzero lastzero added the please-test Ready for acceptance test label May 5, 2021
@lastzero
Copy link
Member

lastzero commented May 5, 2021

You can now use McDonald's as keyword. Trailing single quotes are getting trimmed and you can't use double quotes.

@graciousgrey graciousgrey added released Available in the stable release and removed please-test Ready for acceptance test labels May 5, 2021
@dror3go
Copy link
Author

dror3go commented May 6, 2021

@lastzero Single quote works 👍
However, double quote is also valid in some cases/languages. For example, נתב"ג should be a valid keyword. That's how acronyms are written in some languages. Any chance to add such an exception?

@lastzero
Copy link
Member

lastzero commented May 6, 2021

Wow, didn't know that. Thanks for testing!

More characters we need to keep in mind, other than "? Might not work with our search since you also use " for strings containing a space like "mouse trap".

@dror3go
Copy link
Author

dror3go commented May 6, 2021

What do you think about allowing " and ' when saving/displaying a keyword, but remove these characters when running a database query? So for example (never mind the syntax):

select * from keywords where replace(keyword, '"', '') = replace($searchTerm, '"', '')

Can such a thing work?

As for other characters - yes, checkout Unicode U+0201C and U+0201D, these are used in Apple products by default AFAIK (am not an Apple user myself).

@lastzero
Copy link
Member

lastzero commented May 6, 2021

@graciousgrey We should create a new issue for "search term normalization".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
idea Feedback wanted / feature request released Available in the stable release
Projects
Status: Release 🌈
Development

No branches or pull requests

3 participants