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

Add upgrate step to migrate terms from VCGE 1 to 2 #56

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hvelarde
Copy link
Member

@hvelarde hvelarde commented Jan 8, 2018

closes #25

@caduvieira
Copy link
Contributor

caduvieira commented Jan 9, 2018

Podia usar o termo replaces e o SKOS como no 06c89a7#diff-26ba68ca88173fa2bfef120ac72f89efR73

Nunca terminei esse feature mas creio que seja o mais fácil. Faltou, pelo menos, fazer o que o idgserpro comentou #29 (comment)


Editei. Estava replacedBy mas fiz confusão.

@hvelarde
Copy link
Member Author

hvelarde commented Jan 9, 2018

@caduvieira não entendi onde e por que tu quer usar esse replacedBy.

@caduvieira
Copy link
Contributor

O replaces tem a semântica de que um termo foi trocado por outro conforme http://dublincore.org/2012/06/14/dcterms#replaces e o replacedBy é o inverso desse.

# ignore terms with no equivalence
for term in obj.skos:
if term in self.equivalences:
new += self.equivalences[term]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case all terms would be migrated? or are there any example of term that would remain as it is from old to new version?

for example, we have 3 old terms ['term1', 'term2', 'term3'];
'term2' should be replaced by 'term4' and 'term3' by 'term5';

with the code written now, the result would be ['term4', 'term5'] because 'term1' is not into equivalences dict.

Is it fine like this?

Copy link
Member Author

@hvelarde hvelarde Jan 29, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, check the tests.

Copy link
Member

@rodfersou rodfersou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added one question

@augusto-herrmann
Copy link

There is no such thing as VCGE 1. There is VCGE 2011 and there is VCGE 2.

How exactly do you propose replacing VCGE 2011 terms with VCGE 2 terms?

SKOS has neither a replaces nor replacedBy property. Dublin Core has a replaces property, but its semantics require that both resources be semantic equivalent. That will not be possible in most cases, considering that the VCGE 2 vocabulary has a tiny number of terms in comparison to VCGE 2011 and in the vast majority of cases it won't be possible to find and equivalent term in VCGE 2.

Notwithstanding the technical difficulty that in most cases you won't find a term to map to in VCGE 2, you would also lose a lot of information by migrating, considering that VCGE 2 is too generic. Which makes me wonder why would anyone even want to migrate to it in the first place. If the reason for migrating is that VCGE 2011 is no longer maintained, consider instead migrating to a more useful vocabulary, such as Eurovoc.

@hvelarde
Copy link
Member Author

@augusto-herrmann a migração do VCGE 1 para o VCGE 2 está documentada aqui e a maioria dos casos está coberta:

eu não estou qualificado para opinar sobre o vocabulário nem seu uso, meu único interesse é prover a migração pois não é mais recomendado usar o branch 1.x deste pacote.

esse é o escopo deste pull request; qualquer outro assunto deve ser tratado em outro lugar.

@augusto-herrmann
Copy link

esse é o escopo deste pull request; qualquer outro assunto deve ser tratado em outro lugar.

Entendo. Eu não vejo mais razão de existir para esse pacote. A partir de agora vou parar de segui-lo e não comentarei mais em suas threads e issues.

@hvelarde
Copy link
Member Author

hvelarde commented Feb 15, 2018

alguém mais pode por favor revisar isso aqui?

@AlexandreChagas este PR soluciona seu problema, se ainda é um problema.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

VCGE 2.0.0 bug
4 participants