You will be using on RV related review comments to train a Sentence completion model. You could use the code below. The code is written in Jupyter notebook python.  please follow the following instructions: 1. Build a working sentence completion model. Training data is provided in train.csv. This model should take partial sentences (e.g., "hey how ar," "hello, please") and provide completion for that sentence. Not every input needs to be completed into a correct sentence (e.g., "asdfauaef" does not need to have a sentence completion). For this model's purposes, a sentence is considered completed if an "end of sentence" character (like a full stop, question mark, etc.) occurs within the next five words OR. We predict up to 5 words from the input. 2. BONUS: If you use word vectors or other techniques from what we shared in class using character encoding and have a working model. 3. The test data (test.csv) will be used to evaluate the model. The test file contains partial sentences. Use the sentence completion model to complete these partial sentences. Your test metric is = # of completed sentences that make sense to a manual reviewer / total # of sentences ( = 100) The code is written in Jupyter notebook import torch import re import numpy as np import pandas as pd from torch import nn

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

You will be using on RV related review comments to train a Sentence completion model. You could use the code below. The code is written in Jupyter notebook python.  please follow the following instructions:

1. Build a working sentence completion model. Training data is provided in train.csv. This model should take partial sentences (e.g., "hey how ar," "hello, please") and provide completion for that sentence. Not every input needs to be completed into a correct sentence (e.g., "asdfauaef" does not need to have a sentence completion). For this model's purposes, a sentence is considered completed if an "end of sentence" character (like a full stop, question mark, etc.) occurs within the next five words OR. We predict up to 5 words from the input.

2. BONUS: If you use word vectors or other techniques from what we shared in class using character encoding and have a working model.

3. The test data (test.csv) will be used to evaluate the model. The test file contains partial sentences. Use the sentence completion model to complete these partial sentences. Your test metric is = # of completed sentences that make sense to a manual reviewer / total # of sentences ( = 100)

The code is written in Jupyter notebook

import torch
import re
import numpy as np
import pandas as pd
from torch import nn

 

Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Top down approach design
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education