flame_copper
Banned
- Joined
- Apr 13, 2006
- Messages
- 1,474
- Reaction score
- 0
text = 'John likes to watch movies. Mary likes too.'
text1 = 'John also likes to watch football games.'
dic1 = {"John": 1, "likes": 2, "to": 3, "watch": 4, "movies": 5, "also": 6, "football": 7, "games": 8, "Mary": 9, "too": 10}
v1 = [1, 2, 1, 1, 1, 0, 0, 0, 1, 1]
v2 = [1, 1, 1, 1, 0, 1, 1, 1, 0, 0]
hi there,I am doing my information assignment.
I am trying to merge text and text1 into a dic1,
after which I want v1 and v2 to display the vectors,
how can I achieve this?
I am thinking of using set functions and dict features?
text1 = 'John also likes to watch football games.'
dic1 = {"John": 1, "likes": 2, "to": 3, "watch": 4, "movies": 5, "also": 6, "football": 7, "games": 8, "Mary": 9, "too": 10}
v1 = [1, 2, 1, 1, 1, 0, 0, 0, 1, 1]
v2 = [1, 1, 1, 1, 0, 1, 1, 1, 0, 0]
hi there,I am doing my information assignment.
I am trying to merge text and text1 into a dic1,
after which I want v1 and v2 to display the vectors,
how can I achieve this?
I am thinking of using set functions and dict features?