Jul-09-2020, 03:30 AM
OK. Understood. The question extends to the following operations. If 'set(sent3)' generates the distinct token total for sentence 3, and 'set(text1)' generates the distinct token total for text 1, clearly the former operation is less than the latter. However, when I substitute 'sent3' for 'sent2' [i.e. set(sent2) < set(text1)] why is the output 'false', when the former operation [i.e. set(sent3) < set(text1)] is 'true'? Irrespective of which sentence, the vocabulary total for these 2 sentences (or any singular sentence as a general rule) will always be less than the vocabulary total of an entire text [i.e. set(text1)]. The code is below:
>>> set(sent2) < set(text1) [output]False[/output] >>> set(sent3) < set(text1) [output]True[/output] >>> set(sent4) < set(text1) [output]False[/output] >>> set(sent5) < set(text1) [output]False[/output] >>> set(sent6) < set(text1) [output]False[/output] >>> set(sent7) < set(text1) [output]False[/output] >>> set(sent8) < set(text1) [output]False[/output] >>> set(sent9) < set(text1) [output]False [/output]