I need some consultation on the correctness of the activity diagram, that I have created for the following scene:
I have one dictionary structure, that I want to compare to other dictionaries. for the explanation I want to name them as sentences. So, I am comparing one sentence to other multiple sentences by iterating through them. I am counting the words that match, as bestCount.
Now at first, the very first sentence will be counted as bestDict. then go to the second sentence, and if the bestCount is greater than the previous one, then count the second sentence as bestDict and if not don't change the bestDict, which means the first sentence should be our bestCount.
In case, if there are multiple sentences, which have the same bestCount, for example if our second sentence was selected as bestDict, where bestCount is 5, and our third dictionary also has, 5 bestCount, then I compare the size of these two sentences and select the bestDict, which has the smallest size.
I am doing this for each one till the end. I have created the following diagram, and need some consultation, regarding the correctness of it, to what I have told in the scene.