When I add keywords to an image, Exiftool keeps them where I put them. The order is carefully considered, NOT RANDOM. I want my customers to see them in the order I wrote them. Please do NOT correct them for me.
Checking with Photoshop, Windows 7 Explorer, PhotoME and ExifTool, all faithfully conform to the industry standard which is to honor the Keyword Author's order. Google/Bing/Yahoo/... certainly do not need help sorting. Is there a checkbox with which I can turn OFF "AUTO-CORRECT KEYWORDS"?
My customers are seeing:
6th Street, Austin, Austin, Texas USA, Brian P. Barnes, ... Seeing "Austin, Austin" makes me look as though I am on drugs. And, you do not need to "Unique" them as my code already does so. Hashing in order to Unique an array often destroys order. Which problem are you solving by tampering with Intellectual Property you do NOT own without permission?
Could you please RESCAN my Images and show the Metadata VERBATIM without editorial enhancement or correction.
One other detail; your use of the comma as the delimiter with text which already contains many commas causes readability problems concerning where one keyword ends and the next begins. Adobe tackles this by using the SEMICOLON to make clear where each Keyword ends.
Scanning the Keywords for a COMMA and using a SEMICOLON if found is simple logic:
$keyword_delimiter = ($keyword_sentence =~ m/,/) ? ';' : ','; # Use ';' if keywords have ','!
Log file extract of Keyword Creation Code:
-Keywords=SXSW -Keywords="Austin, Texas USA" -Keywords="6th Street, Austin" -Keywords="Brian P. Barnes Fractasia.com" -Keywords=http://www.Fractasia.com/SXSW
-Keywords=D800Extreme -Keywords="Nova FirstLight FocusAssist" -Keywords="Category=People" -Keywords="SupplementalCategories=Portrait,Groups" -Keywords="IntellectualGenre=People" -Keywords="SubjectCode=Portrait" -Keywords="Scene=Groups"
Photoshop's faithful rendering and NOTE the SEMICOLON Keyword Delimiters:
SXSW; "Austin, Texas USA"; "6th Street, Austin"; "Brian P. Barnes Fractasia.com";http://www.Fractasia.com/SXSW
; D800Extreme; Nova FirstLight FocusAssist; Category=People; "SupplementalCategories=Portrait,Groups"; IntellectualGenre=People; SubjectCode=Portrait; Scene=Groups
keywords as shown in Windoz 7 Explorer (even microsoft honors the order <;-o): SEMICOLONS!
SXSW; Austin, Texas USA; 6th Street, Austin; Brian P. Barnes Fractasia.com; http:/www.Fractasia.com/SXSW; D800Extreme; Nova FirstLight FocusAssist; Category=People; SupplementalCategories=Portrait,Groups; IntellectualGenre=People; SubjectCode=Portrait; Scene=Groups;
Exiftool (9.93, latest)
exiftool -a -S -sep "; " P:\br1\sxsw.2015\sx-finished\best\sx-2015.0321-245506.bb2.jpg | grep "Keywords: "
Keywords: SXSW; Austin, Texas USA; 6th Street, Austin; Brian P. Barnes Fractasia.com;http://www.Fractasia.com/SXSW
; D800Extreme; Nova FirstLight FocusAssist; Category=People; SupplementalCategories=Portrait,Groups; IntellectualGenre=People; SubjectCode=Portrait; Scene=Groups
Keyword: Austin, Texas USA
Keyword: 6th Street, Austin
Keyword: Brian P. Barnes - Fractasia.com
Keyword: Nova FirstLight FocusAssist