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

other pseudonyms #153

Open
JanOdijk opened this issue Jun 14, 2023 · 4 comments
Open

other pseudonyms #153

JanOdijk opened this issue Jun 14, 2023 · 4 comments

Comments

@JanOdijk
Copy link
Collaborator

I encounter the following other "pseudonyms" (with their frequencies) in the reference data:

  • VOORNAAM: (this should be added to the category "person")

    • VOORNAAM1 5
    • VOORNAAM2 5
    • voornaam1 1
    • voornaam2 1
    • VOORNAAM3 6
    • VOORNAAM4 2
  • Lower case variants: (are they allowed?)

    • plaatsnaam1 3
    • voornaam1 1
    • voornaam2 1
  • NAAMOVERIG: (new category, should be added)

    • NAAMOVERIG1 6
    • NAAMOVERIG2 4
    • NAAMOVERIG3 2
  • A pseudonym with counter 5 (is this allowed?)

    • NAAM5 3

In category "profession" the common value "chirurgh" should be replaced by "chirurg"

@JanOdijk
Copy link
Collaborator Author

and I also encountered NAAM3. (with a period at the end, which occurs at the end of an utterance. Is this allowed?

@JeltevanBoheemen
Copy link
Contributor

  • VOORNAAM: (this should be added to the category "person")

This is already a valid code, <prefix>NAAM. It is possible you encountered these without replacements in older versions of SASTA. A bug existed that didn't anonymise CHAT input, only Word input.
See for test example utterances and their expected replacement:

@pytest.fixture
def example_utterances():
return [
{
'text': 'Dit is een voorbeeldzin.',
'exp_text': 'Dit is een voorbeeldzin.',
'exp_tiers': {},
},
{
'text': 'Ik ben NAAM uit PLAATSNAAM2.',
'exp_text': 'Ik ben Maria uit Leiden.',
'exp_tiers': {'xano': '16|PLAATSNAAM2|Leiden, 7|NAAM|Maria'},
},
{
'text': 'Ik ben BEROEP1 in het INSTELLING in LAND2.',
'exp_text': 'Ik ben chirurgh in het Diakonessenhuis in Japan.',
'exp_tiers': {'xano': '7|BEROEP1|chirurgh, 37|LAND2|Japan, 23|INSTELLING|Diakonessenhuis'},
},
{
'text': 'Ik heb STUDIE en STUDIE1 gestudeerd.',
'exp_text': 'Ik heb bedrijfskunde en informatica gestudeerd.',
'exp_tiers': {'xano': '7|STUDIE|bedrijfskunde, 24|STUDIE1|informatica'},
},
{
'text': 'Ik heet NAAM1 en hij heet NAAM2.',
'exp_text': 'Ik heet Jan en hij heet Anna.',
'exp_tiers': {'xano': '8|NAAM1|Jan, 24|NAAM2|Anna'},
},
{
'text': 'Dit is een voorbeeldzin...',
'exp_text': 'Dit is een voorbeeldzin+...',
'exp_tiers': {'xpct': '23|...|+...'},
},
{
'text': 'Dit... is een... voorbeeldzin.',
'exp_text': 'Dit+... is een+... voorbeeldzin.',
'exp_tiers': {'xpct': '3|...|+..., 14|...|+...'},
},
{
'text': 'Ik heet # NAAM.',
'exp_text': 'Ik heet (.) Maria.',
'exp_tiers': {'xpct': '8|#|(.)', 'xano': '10|NAAM|Maria'},
},
{
'text': 'XXX deed ik met VOORNAAM2 ACHTERNAAM2 deed ik samen VOORNAAM2 ACHTERNAAM2.',
'exp_text': 'XXX deed ik met Anna Dekker deed ik samen Anna Dekker.',
'exp_tiers': {'xano': '26|ACHTERNAAM2|Dekker, 57|ACHTERNAAM2|Dekker, 16|VOORNAAM2|Anna, 42|VOORNAAM2|Anna'}
},
{
'text': 'Bla bla # bla...',
'exp_text': 'Bla bla (.) bla+...',
'exp_tiers': {'xpct': '13|...|+..., 8|#|(.)'}
},
{
'text': 'Ik heet NAAM1 en hij heet NAAM2.',
'exp_text': 'Ik heet Jan en hij heet Anna.',
'exp_tiers': {'xano': '8|NAAM1|Jan, 24|NAAM2|Anna'},
},
]

  • Lower case variants: (are they allowed?)

No. This could lead to incorrect replacements: Mijn voornaam is Piet -> Mijn Jan is Piet

  • NAAMOVERIG: (new category, should be added)

This is already a valid code: NAAM<suffix>. Same explanation as VOORNAAM.

  • A pseudonym with counter 5 (is this allowed?)

Not currently, easy to implement though.

In category "profession" the common value "chirurgh" should be replaced by "chirurg"

Good catch

@JanOdijk
Copy link
Collaborator Author

Thanks. I did not read the documentation well enough.
How do you prevent that ACHTERNAAM is analysed as with prefix ACHTER and CODE NAAM? You first search for the longest CODE in a pseudonym?

@JeltevanBoheemen
Copy link
Contributor

Indeed, longest -> shortest is checked

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

No branches or pull requests

2 participants