Question: 6 Task 5 - Toolkit.java [10 Marks] The Toolkit class includes methods you need to use/complete to load data from the DSM file. FILENAME GLOVE
![6 Task 5 - Toolkit.java [10 Marks] The Toolkit class includes](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/10/670a0361102fa_472670a0360ea860.jpg)
6 Task 5 - Toolkit.java [10 Marks] The Toolkit class includes methods you need to use/complete to load data from the DSM file. FILENAME GLOVE is the name of the DSM file (the structure of this file can be found in Section 1.2, page 4), and FILENAME STOPWORDSis the name of the file that contains a list of stop words (will explain the usage of it in Task 6.1). HINT: Remember to use the try... catch() ... finally blocks. Do NOT hardcode your file path. 6.1 Task 5.1 - loadGLOVE() [5 Marks] In this task, you are required to use a BufferedReader (myReader) to read data from the DSM file (FILENAME GLOVE) line by line. . Read the file line by line and analyse the result - adding the word to list Vocabulary and its vector representation to list Vectors. . Use the Toolkit.getFileFromResource (String _fileName) method to get the cor- rect file path. 6.2 Task 5.2 - loadStop Words() [5 Marks] Similar to Task 5.1, used a BufferedReader to read the FILENAME STOPWORDS file, and add those stop words in listStop Words defined in this method
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
