Question: Question 3 - Text Processing - 1 0 points ( 2 pts ) [ Regex ] A Java variable name must start with an alpha

Question 3- Text Processing -10 points
(2 pts)[Regex] A Java variable name must start with an alpha-character {A-Z,a-Z} or underscore - and cannot start with a digit and has a maximum of 32 characters chosen from alpha-numeric characters (includes A-Z a-Z 0-9) or underscopre - Write a regular expression to describe any Java variable name.
Consider the following 4 sentences.
S1= "Sam Sam I am Sam"
S2= "I like Sam like Fish Chips"
53= "Sam Sam Fish Chips"
54= "Fish Chips like Sam Chips"
(a)(4 pts) Create the term-frequency matrix TF where rows are sentences and columns are words.
Sam I am Fish Chips like
S1
S2
S3
S4
(b)(4 pts) Using L1 or Manhattan distance between two sentence vectors in the TF matrix, create the 4x4 distance matrix. Using the matrix of distances, group Sentences into two clusters where sentences are "similar". Use any tie breaking rule and clearly describe your algorithm.
 Question 3- Text Processing -10 points (2 pts)[Regex] A Java variable

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!