-
Notifications
You must be signed in to change notification settings - Fork 24
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
Fix: aff advice #880
Fix: aff advice #880
Conversation
packtools/sps/validation/aff.py
Outdated
is_valid=bool(original), | ||
expected="original affiliation", | ||
obtained=original, | ||
advice='mark complete institutional affiliation with <aff><institution content-type="original">', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Rossi-Luciano Use 'original' no lugar de 'complete'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, @robertatakenaka
packtools/sps/validation/aff.py
Outdated
is_valid=bool(orgname), | ||
expected="orgname", | ||
obtained=orgname, | ||
advice='mark institutional affiliation name with <aff><institution content-type="orgname">', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Rossi-Luciano Para escrever 'advice', consulte o guia SPS 1.10:
orgname | Representa a instituição de primeiro nível hierárquico mencionada na afiliação. |
---|---|
orgdiv1 | Representa, hierarquicamente, a primeira divisão da instituição mencionada. |
orgdiv2 | Representa, hierarquicamente, a segunda divisão da instituição mencionada. |
original | Identifica a afiliação completa conforme consta no texto do artigo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- orgname: Mark the main institution with
<aff><institution content-type="orgname">
- orgdiv1: Mark the first hierarchical subdivision with
<aff><institution content-type="orgdiv1">
- orgdiv2: Mark the second hierarchical subdivision with
<aff><institution content-type="orgdiv2">
- original: Mark the complete original affiliation text with
<aff><institution content-type="original">
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, @robertatakenaka
packtools/sps/validation/aff.py
Outdated
country_code if is_valid else f"one of {country_codes_list}" | ||
), | ||
obtained=country_code, | ||
advice=f"add @country in <aff><country country=VALUE> and replace VALUE with one of {country_codes_list}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
f'Complete country="" in <aff><country country=""> with a valid value: {country_codes_list}'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, @robertatakenaka
packtools/sps/validation/aff.py
Outdated
is_valid=bool(state), | ||
expected="state", | ||
obtained=state, | ||
advice='mark affiliation state with <aff><addr-line><named-content content-type="state">', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mark affiliation state with <aff><addr-line><state>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, @robertatakenaka
packtools/sps/validation/aff.py
Outdated
is_valid=bool(city), | ||
expected="city", | ||
obtained=city, | ||
advice='mark affiliation city with <aff><addr-line><named-content content-type="city">', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Troque <named-content content-type="city">
por <city>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, @robertatakenaka
packtools/sps/validation/aff.py
Outdated
is_valid=bool(aff_id), | ||
expected="affiliation ID", | ||
obtained=aff_id, | ||
advice="add @id in <aff id=VALUE> and replace VALUE with affiliation identifier", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
advice='Complete id="" in <aff id=""> with affiliation identifier. Consult the documentation of SPS of the current version',
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, @robertatakenaka
packtools/sps/validation/aff.py
Outdated
@@ -411,9 +401,9 @@ def validate_comparison(self, main_aff: dict): | |||
got = result["got"] | |||
items = result["items"] | |||
if self.affiliation.get("id"): | |||
advice = f"Review affiliation ({self.affiliation.get('id')})" | |||
advice = f"Low similarity detected. Review and adjust affiliation ({self.affiliation.get('id')}) to better match the main text." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Rossi-Luciano Use um texto menos técnico.
The affiliation {self.affiliation} is inconsistent with {main_aff}. Check if {self.affiliation} is translation of {main_aff}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, @robertatakenaka
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Rossi-Luciano fazer as correções
packtools/sps/validation/aff.py
Outdated
@@ -401,9 +401,9 @@ def validate_comparison(self, main_aff: dict): | |||
got = result["got"] | |||
items = result["items"] | |||
if self.affiliation.get("id"): | |||
advice = f"Low similarity detected. Review and adjust affiliation ({self.affiliation.get('id')}) to better match the main text." | |||
advice = f"The affiliation {self.affiliation.get("id")} is inconsistent with {main_aff}. Check if {self.affiliation.get("id")} is translation of {main_aff}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Rossi-Luciano ajuste as aspas do início e do fim
f'The affiliation {self.affiliation.get("id")} is inconsistent with {main_aff}. Check if {self.affiliation.get("id")} is translation of {main_aff}'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, @robertatakenaka
O que esse PR faz?
Ajusta o conteúdo de
advice
nas funções de validação deaff
.Onde a revisão poderia começar?
Por commit.
Como este poderia ser testado manualmente?
NA.
Algum cenário de contexto que queira dar?
NA.
Screenshots
NA.
Quais são tickets relevantes?
TK #878
Referências
NA.