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
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
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
Step by step
Solved in 2 steps