Skip to content

Updated model card #1809

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ pipeline = Pipeline(stages=[
])

# Generating example
data = spark.createDataFrame(["he was begun on physical therapy but remained agitated .",
"there were no meatal blood ."], StringType()).toDF("text")
data = spark.createDataFrame(["MRI confirms the presence of a malignant brain tumor.",
"Despite the patient’s history of smoking, there is no radiological or pathological evidence of lung cancer at this time."], StringType()).toDF("text")

result = pipeline.fit(data).transform(data)

Expand Down Expand Up @@ -134,8 +134,8 @@ pipeline = nlp.Pipeline(stages=[
assertion_classifier
])
# Generating example
data = spark.createDataFrame(["he was begun on physical therapy but remained agitated .",
"there were no meatal blood ."], StringType()).toDF("text")
data = spark.createDataFrame(["MRI confirms the presence of a malignant brain tumor.",
"Despite the patient’s history of smoking, there is no radiological or pathological evidence of lung cancer at this time."], StringType()).toDF("text")

result = pipeline.fit(data).transform(data)
```
Expand Down Expand Up @@ -183,8 +183,8 @@ val pipeline = new Pipeline().setStages(
assertion_classifier
))

val data = Seq(Array("he was begun on physical therapy but remained agitated .",
"there were no meatal blood .")).toDF("text")
val data = Seq(Array("MRI confirms the presence of a malignant brain tumor.",
"Despite the patient’s history of smoking, there is no radiological or pathological evidence of lung cancer at this time.")).toDF("text")

val result = pipeline.fit(data).transform(data)
```
Expand All @@ -194,12 +194,12 @@ val result = pipeline.fit(data).transform(data)

```bash

+----------------------------------------------------------------+-------+
|text |result |
+----------------------------------------------------------------+-------+
|he was begun on physical therapy but remained agitated . |present|
|there were no meatal blood . |absent |
+----------------------------------------------------------------+-------+
+------------------------------------------------------------------------------------------------------------------------+---------+
|text | result |
+------------------------------------------------------------------------------------------------------------------------+---------+
|MRI confirms the presence of a malignant brain tumor. | Present |
|Despite the patient’s history of smoking, there is no radiological or pathological evidence of lung cancer at this time.| Absent |
+------------------------------------------------------------------------------------------------------------------------+---------+

```

Expand Down