blagae / whitakers_words

Other
23 stars 5 forks source link

Gender of nouns is always 'Unknown' #2

Closed bolner closed 3 years ago

bolner commented 3 years ago

Examples:

Example response:

{
    "text": "scriptor",
    "forms": [
        {
            "text": "scriptor",
            "analyses": {
                "34453": {
                    "lexeme": {
                        "id": 34453,
                        "category": [
                            3,
                            1
                        ],
                        "roots": [
                            "scriptor",
                            "scriptor"
                        ],
                        "senses": [
                            "writer, author",
                            "scribe"
                        ],
                        "wordType": "Noun"
                    },
                    "root": "",
                    "inflections": [
                        {
                            "wordType": "Noun",
                            "category": [
                                3,
                                0
                            ],
                            "stem": "scriptor",
                            "affix": "",
                            "features": {
                                "Case": "Nominative",
                                "Number": "Singular",
                                "Gender": "Unknown"
                            },
                            "id": 279
                        },
                        {
                            "wordType": "Noun",
                            "category": [
                                3,
                                0
                            ],
                            "stem": "scriptor",
                            "affix": "",
                            "features": {
                                "Case": "Vocative",
                                "Number": "Singular",
                                "Gender": "Unknown"
                            },
                            "id": 280
                        }
                    ],
                    "enclitic": null
                },
                "34451": {
                    "lexeme": {
                        "id": 34451,
                        "category": [
                            1,
                            1
                        ],
                        "roots": [
                            "script",
                            "script",
                            "scriptav",
                            "scriptat"
                        ],
                        "senses": [
                            "write",
                            "compose"
                        ],
                        "wordType": "Verb"
                    },
                    "root": "",
                    "inflections": [
                        {
                            "wordType": "Verb",
                            "category": [
                                1,
                                1
                            ],
                            "stem": "script",
                            "affix": "or",
                            "features": {
                                "Tense": "Praesens",
                                "Voice": "Passive",
                                "Mood": "Indicative",
                                "Person": 1,
                                "Number": "Singular"
                            },
                            "id": 968
                        }
                    ],
                    "enclitic": null
                }
            },
            "enclitic": null
        }
    ]
}
bolner commented 3 years ago

This is the output of the original Ada program for the same word. That always indicates the masculine form with "M".

=>scriptor

script.or            V      1 1 PRES PASSIVE IND 1 S
scripto, scriptare, scriptavi, scriptatus  V (1st) TRANS   [EXXEP]    Later  uncommon
write; compose;
scriptor             N      3 1 NOM S M
scriptor             N      3 1 VOC S M
scriptor, scriptoris  N (3rd) M   [XXXBX]
writer, author; scribe;
blagae commented 3 years ago

Hi,

Thank you for reporting this. I am aware of the issue, it's because I don't copy the noun's gender from its stem to its inflection.

I have been thinking of an elegant way to solve it: it is probably trivial in principle, but poses some code design issues that I haven't cleared up. I'll try to look into it asap.

B

blagae commented 3 years ago

This has been fixed now for nouns. Also some tests were corrected to prevent regressions. I'll look into the same issue for adjectives, but I assume it will be a bit less clear: e.g. bonorum can be both masculine and neuter.