Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit daf045c

Browse filesBrowse files
committed
Added grammatical correctness
1 parent 8721ce8 commit daf045c
Copy full SHA for daf045c

File tree

1 file changed

+27
-1
lines changed
Filter options

1 file changed

+27
-1
lines changed

‎README.md

Copy file name to clipboardExpand all lines: README.md
+27-1Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,9 +321,11 @@ SELECT pgml.transform(
321321
]
322322
```
323323

324-
### Quora Question Pairs
324+
### Quora Question Pairs (QQP)
325325
The Quora Question Pairs model is designed to evaluate whether two given questions are paraphrases of each other. This model takes the two questions and assigns a binary value as output. LABEL_0 indicates that the questions are paraphrases of each other and LABEL_1 indicates that the questions are not paraphrases. The benchmark dataset used for this task is the Quora Question Pairs dataset within the GLUE benchmark, which contains a collection of question pairs and their corresponding labels.
326326

327+
If you want to use an QQP model, you can find them on the :hugs: Hugging Face model hub. Look for models with "qqp".
328+
327329
```sql
328330
SELECT pgml.transform(
329331
inputs => ARRAY[
@@ -343,6 +345,30 @@ SELECT pgml.transform(
343345
{"label": "LABEL_0", "score": 0.9988721013069152}
344346
]
345347
```
348+
349+
### Grammatical Correctness
350+
Linguistic Acceptability is a task that involves evaluating the grammatical correctness of a sentence. The model used for this task assigns one of two classes to the sentence, either "acceptable" or "unacceptable". LABEL_0 indicates acceptable and LABEL_1 indicates unacceptable. The benchmark dataset used for training and evaluating models for this task is the Corpus of Linguistic Acceptability (CoLA), which consists of a collection of texts along with their corresponding labels.
351+
352+
If you want to use a grammatical correctness model, you can find them on the :hugs: Hugging Face model hub. Look for models with "cola".
353+
354+
```sql
355+
SELECT pgml.transform(
356+
inputs => ARRAY[
357+
'I will walk to home when I went through the bus.'
358+
],
359+
task => '{"task": "text-classification",
360+
"model": "textattack/distilbert-base-uncased-CoLA"
361+
}'::JSONB
362+
) AS grammatical_correctness;
363+
```
364+
*Result*
365+
```sql
366+
grammatical_correctness
367+
------------------------------------------------------
368+
[
369+
{"label": "LABEL_1", "score": 0.9576480388641356}
370+
]
371+
```
346372
### Token Classification
347373
### Table Question Answering
348374
### Question Answering

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.