Jump to content

Recommended Posts

Hi,

 

Is there a site or a program that can be used to remove duplicate keywords?

 

As in say you have 40 keywords copied that are relevant in some way, But you may have duplicates of some.

 

I find if difficult sometimes to spot duplicates by eye. I'm sure there are simpler ways to keyword images.

 

what I'm trying to do now is put them in Lightroom from the beginning, Easier said than done. I've only been using literoom for a few weeks getting to grips with it and all it's features.

 

I've read on the forum that many members don't feel it necessary to get as close as possible to 50 keywords. Like how many was can you describe a banana so making it ever so time consuming if you where to try and get 50 keywords each time.

 

realistically I've found around 20 keywords tend to be the most accurate before wondering into other keywords that are less relevant.

 

anyway I'm just wondering if there is a program or site members use to check for duplicates.

 

thnaks in advance.

 

 

Share this post


Link to post
Share on other sites

If you ask Alamy Contributor services for a spreadsheet of your metadata, it can then be loaded into Excel and a bit of Excel VBA can written to remove duplicate tags automatically from all images in one go. Then the modified spreadsheet could be sent back to Alamy for them to reimport. The VBA code required to do this isn't dead simple but, if you have some coding experience, it's quite straightforward. I used this technique to apply some global changes to all my tags.

 

For each image in turn

   Read string of comma separated tags from spreadsheet cell

   Loop while all tags in string not examined

      Extract tag from string

      If not seen tag before, store it

      If seen tag already, ignore it 

   Loop back to examine next tag in string

   Write all stored tags back into spreadsheet cell with commas between
   Forget all stored tags

Next image

Edited by M.Chapman
  • Upvote 1

Share this post


Link to post
Share on other sites
56 minutes ago, M.Chapman said:

If you ask Alamy Contributor services for a spreadsheet of your metadata, it can then be loaded into Excel and a bit of Excel VBA can written to remove duplicate tags automatically from all images in one go. Then the modified spreadsheet could be sent back to Alamy for them to reimport. The VBA code required to do this isn't dead simple but, if you have some coding experience, it's quite straightforward. I used this technique to apply some global changes to all my tags.

 

For each image in turn

   Read string of comma separated tags from spreadsheet cell

   Loop while all tags in string not examined

      Extract tag from string

      If not seen tag before, store it

      If seen tag already, ignore it 

   Loop back to examine next tag in string

   Write all stored tags back into spreadsheet cell with commas between
   Forget all stored tags

Next image

 

Clever!

 

wim

Share this post


Link to post
Share on other sites
12 hours ago, wiskerke said:

 

Clever!

 

wim

 

Thanks. Unfortunately the VBA code is not quite as quick to write, but if anyone wants me to have a bash at it, I'm happy to give it a go.

Share this post


Link to post
Share on other sites

My VBA is a little rusty now but you'll need to declare a lot of variables to store,check and rewrite the tag data.  It might be simpler to use the Remove duplicates facility in the data ribbon in a loop.  I'd start by copying the CSV data and pasting into a separate sheet using the Paste special transpose option to generate columns of data rather than rows.  To remove duplicates it would then be simple to write the VBA code to loop through the columns and invoke the RemoveDuplicates option with each pass.  A quick bit of macro generation provides the code string:

    Columns("F:F").Select
    ActiveSheet.Range("$F$1:$F$18").RemoveDuplicates Columns:=1, Header:=xlNo
A standard For..Next loop with variables using absolute referencing to establish the column and row numbers with each pass should do the job.  

Once completed copy the data and use the Paste Special Transpose to convert the data back to rows ready for re-upload.

 

 

  • Upvote 1

Share this post


Link to post
Share on other sites
45 minutes ago, John Richmond said:

My VBA is a little rusty now but you'll need to declare a lot of variables to store,check and rewrite the tag data.  It might be simpler to use the Remove duplicates facility in the data ribbon in a loop.  I'd start by copying the CSV data and pasting into a separate sheet using the Paste special transpose option to generate columns of data rather than rows.  To remove duplicates it would then be simple to write the VBA code to loop through the columns and invoke the RemoveDuplicates option with each pass.  A quick bit of macro generation provides the code string:

    Columns("F:F").Select
    ActiveSheet.Range("$F$1:$F$18").RemoveDuplicates Columns:=1, Header:=xlNo
A standard For..Next loop with variables using absolute referencing to establish the column and row numbers with each pass should do the job.  

Once completed copy the data and use the Paste Special Transpose to convert the data back to rows ready for re-upload.

 

 

Not really that complex. Only needs a few variables.

InputString (to accept the entire contents of the tags spreadsheet cell for a given image which contains all the tags)

OutputString(to store all the unique keywords in before they are written back to the cell)

CurrentTag (to store the tag currently being worked on, extracted from InputString and then written, if unique, to the output string)

Plus a couple of loop counters and pointers.

 

I wrote something similar when I wanted to ensure all my tags (from the old system) were separated by commas, except where I'd used quotes.

 

It gets slightly more complex if both tags and super-tags are to be checked if the tag is to be removed when the supertag exists.

It also needs to remove any capitalisation before checking for duplicates.   

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.