negation_twitter_mexican_spanish / negation_twitter_mexican_spanish.py
delacruzG's picture
Update negation_twitter_mexican_spanish.py
065b83e
# coding=utf-8
# Copyright 2020 The TensorFlow Datasets Authors and the HuggingFace Datasets Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Lint as: python3
"""Negation Detection on Mexican Spanish Tweets: The T-MexNeg Corpus."""
import datasets
from datasets.tasks import TextClassification
_DESCRIPTION = """
The T-MexNeg corpus of Tweets written in Mexican Spanish.
It consists of 13,704 Tweets, of which 4895 contain negation structures.
The corpus is the result of an analysis of sentiment and negation statements embedded in the language employed on social media. This repository includes annotation guidelines along with the corpus, manually annotated with labels of sentiment, negation cue, scope, and, event.
Twitter was used as the innitial source of the corpus; the tweets are a random subset of a set collected from Mexican users from September 2017 to April 2019.
"""
_CITATION = """\
@Article{app11093880,
AUTHOR = {Bel-Enguix, Gemma and Gómez-Adorno, Helena and Pimentel, Alejandro and Ojeda-Trueba, Sergio-Luis and Aguilar-Vizuet, Brian},
TITLE = {Negation Detection on Mexican Spanish Tweets: The T-MexNeg Corpus},
JOURNAL = {Applied Sciences},
VOLUME = {11},
YEAR = {2021},
NUMBER = {9},
ARTICLE-NUMBER = {3880},
URL = {https://www.mdpi.com/2076-3417/11/9/3880},
ISSN = {2076-3417},
DOI = {10.3390/app11093880}
}
"""
_DOWNLOAD_URL = "https://gitlab.com/gil.iingen/negation_twitter_mexican_spanish/-/blob/master/CORPUS.xml"
class negation_twitter_spanish(datasets.GeneratorBasedBuilder):
""""The T-MexNeg corpus of Tweets written in Mexican Spanish"""
VERSION = datasets.Version("1.0.0")
def _info(self):
return datasets.DatasetInfo(
description=_DESCRIPTION,
features=datasets.Features(
{"text": datasets.Value("string"), "label": datasets.features.ClassLabel(names=["paraphrased", "non-paraphrased"])}
),
supervised_keys=[""],
homepage="http://????????",
citation=_CITATION,
task_templates=[TextClassification(text_column="text", label_column="label")],
)