globalwordnet / schemas

WordNet-LMF formats
https://globalwordnet.github.io/schemas/
20 stars 11 forks source link

Sentiment Representation #6

Open jmccrae opened 5 years ago

1313ou commented 4 years ago

Suggestion

<xsd:element name='Sentiment'>
    <xsd:complexType mixed='true'>
        <xsd:attribute name='class' use='optional'>
            <xsd:simpleType>
                <xsd:restriction base='xsd:string'>
                    <xsd:enumeration value='Neutral' />
                    <xsd:enumeration value='Positive' />
                    <xsd:enumeration value='Negative' />
                </xsd:restriction>
            </xsd:simpleType>
        </xsd:attribute>
        <xsd:attribute name='value' type='xsd:integer' use='optional' />
    </xsd:complexType>
</xsd:element>
fcbond commented 4 years ago

For our sentiment, we only have a single value (-1.00 .. 1.00), where Polish wordnet has +/- strong/weak, neutral.

I am not sure how best to represent these in your schema.

On Fri, Jul 31, 2020 at 5:07 PM Bernard Bou notifications@github.com wrote:

Suggestion

xsd:simpleType — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub , or unsubscribe .

-- Francis Bond http://www3.ntu.edu.sg/home/fcbond/ Division of Linguistics and Multilingual Studies Nanyang Technological University

1313ou commented 4 years ago

For the numeric value a float range would perhaps be more appropriate:

<xsd:simpleType name="SentimentRange">
    <xsd:restriction base="xsd:float">
        <xsd:minInclusive value="-1."/>
        <xsd:maxInclusive value="+1."/>
    </xsd:restriction>
</xsd:simpleType>

and replace with

<xsd:attribute name='value' type='SentimentRange' use='optional' />

1313ou commented 4 years ago

Or directly:

<xsd:element name='Sentiment'>
    <xsd:complexType>
        <xsd:attribute name='class' use='optional'>
            <xsd:simpleType>
                <xsd:restriction base='xsd:string'>
                    <xsd:enumeration value='Neutral' />
                    <xsd:enumeration value='Positive' />
                    <xsd:enumeration value='Negative' />
                </xsd:restriction>
            </xsd:simpleType>
        </xsd:attribute>
        <xsd:attribute name='value' use='optional' />
            <xsd:simpleType>
                <xsd:restriction base="xsd:float">
                    <xsd:minInclusive value="-1."/>
                    <xsd:maxInclusive value="+1."/>
                </xsd:restriction>
            </xsd:simpleType>
        </xsd:attribute>
    </xsd:complexType>
</xsd:element>
jmccrae commented 3 years ago

Do we want to add this to the 1.1 version of the schema? If so could someone make a PR for this?