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

Sentiment Representation #6

Open
jmccrae opened this issue Jul 25, 2019 · 5 comments
Open

Sentiment Representation #6

jmccrae opened this issue Jul 25, 2019 · 5 comments

Comments

@jmccrae
Copy link
Member

jmccrae commented Jul 25, 2019

No description provided.

@1313ou
Copy link

1313ou commented Jul 31, 2020

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
Copy link
Member

fcbond commented Aug 1, 2020 via email

@1313ou
Copy link

1313ou commented Aug 1, 2020

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
Copy link

1313ou commented Aug 1, 2020

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
Copy link
Member Author

jmccrae commented Oct 5, 2020

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

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

No branches or pull requests

3 participants