Text Classification
Transformers
PyTorch
Safetensors
xlm-roberta
TextClassificationPipeline
text-embeddings-inference
Instructions to use ssharoff/genres with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ssharoff/genres with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="ssharoff/genres")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("ssharoff/genres") model = AutoModelForSequenceClassification.from_pretrained("ssharoff/genres") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,42 @@
|
|
| 1 |
---
|
| 2 |
license: cc-by-sa-4.0
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: cc-by-sa-4.0
|
| 3 |
---
|
| 4 |
+
|
| 5 |
+
# Model description:
|
| 6 |
+
|
| 7 |
+
This is a simple model aimed at predicting the genres of an arbitrary Web text.
|
| 8 |
+
|
| 9 |
+
It should be integrateable into the standard pipelines. For example:
|
| 10 |
+
from transformers import pipeline
|
| 11 |
+
classifier = pipeline("text-classification",model='ssharoff/genres')
|
| 12 |
+
print(classifier(""))
|
| 13 |
+
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
| Code | Label | Question to be answered | Prototypes | Comments |
|
| 17 |
+
|------|------------|--------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------|
|
| 18 |
+
| A1 | argum | To what extent does the text argue to persuade the reader to support an opinion or a point of view? | argumentative blogs, editorials or opinion pieces | |
|
| 19 |
+
| A4 | fictive | To what extent is the text's content fictional? | novels, poetry, myths, film plot summaries | |
|
| 20 |
+
| A7 | instruct | To what extent does the text aim at teaching the reader how something works or at giving advice? | tutorials or FAQs | This also includes a list of questions themselves. |
|
| 21 |
+
| A8 | reporting | To what extent does the text appear to be an informative report of events recent at the time of writing? | Reporting news story | Information about future events can be considered as reporting too. \`None' if a news article only discusses a state of affairs |
|
| 22 |
+
| A9 | legal | To what extent does the text specify a set of regulations? | Laws, contracts, copyright notices, terms&conditions. | |
|
| 23 |
+
| A11 | personal | To what extent does the text report a first-person story? | Diary entries, travel blogs | |
|
| 24 |
+
| A12 | commercial | To what extent does the text promote a product or service? | Adverts, spam | |
|
| 25 |
+
| A14 | academic | To what extent does the text report academic research? | Academic research papers | |
|
| 26 |
+
| A16 | info | To what extent does the text provide reference information to define the topic of this text? | Encyclopedic articles, dictionary definitions, specifications | |
|
| 27 |
+
| A17 | reviews | To what extent does the text evaluate a specific entity by endorsing or criticising it? | Reviews of a product, location or performance | |
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
The system of categories for predictions follows:
|
| 31 |
+
```
|
| 32 |
+
@Article{sharoff18genres,
|
| 33 |
+
author = {Serge Sharoff},
|
| 34 |
+
title = {Functional Text Dimensions for the annotation of {Web} corpora},
|
| 35 |
+
journal = {Corpora},
|
| 36 |
+
volume = {13},
|
| 37 |
+
number = {1},
|
| 38 |
+
pages = {65--95},
|
| 39 |
+
year = {2018}
|
| 40 |
+
}
|
| 41 |
+
```
|
| 42 |
+
[http://corpus.leeds.ac.uk/serge/publications/2018-ftd.pdf]
|