Answers.Body: <p>Unigram and bigram accuracy is a measure used in machine translation to assess the quality of a machine-generated translation compared to a reference translation.</p>
  <ul>
  <li><p>Unigram accuracy is the number of words in the candidate translation that exactly match the words in the reference translation, divided by the total number of words in the candidate translation.</p>
  </li>
  <li><p>Bigram accuracy is the number of consecutive word pairs (bigrams) in the candidate's translation that exactly match the bigrams in the reference translation, divided by the total number of bigrams in the candidate's translation.</p>
  </li>
  </ul>
  <p>Now, to understand the statement, suppose we have a candidate translation C with N words and a reference translation R. If the precision of the unigrams is (N-1)/N, this means that all but one of the words in C match those in R.</p>
  <p>However, this does not guarantee that the bigram accuracy will be at most (N-2)/(N-1). In fact, there could be cases where the bigram accuracy is much lower. For example, consider the following case:</p>
  <ul>
  <li>C = &quot;La chatte et sur le tapis&quot;</li>
  <li>R = &quot;Le tapis est sous la chatte&quot;.</li>
  </ul>
  <p>Here, every word in C is also in R, so the unigram precision is 1. However, none of the pairs of consecutive words in C correspond to a pair of consecutive words in R, so the bigram precision is 0. This is an example that contradicts the given statement.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-11-06T09:14:23.830Z
Answers.Text: Aren't "la chatte" and "le tapis" pairs of consecutive words both in C and R, or is capitalization relevant?
Answers.UserDisplayName: Jaume Oliver Lafont
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-11-06T09:15:28.567Z
Answers.Text: Good question @JaumeOliverLafont I say it is capitalization relevant otherwise it messes up my example ;)
Answers.UserDisplayName: Revolucion for Monica
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-11-06T09:22:08.120Z
Answers.Text: @Revolucion for Monica
  
  Thank you for replying, but can you give an example in English as I am unable to understand the language used by you.
Answers.UserDisplayName: Geeklovenerds
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-11-06T09:28:07.637Z
Answers.Text: We  need a counter example; saying bigram accuracy is strictly greater to disprove.
Answers.UserDisplayName: Geeklovenerds
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-11-06T09:28:42.500Z
Answers.Text: This is the Question-
  Consider the following machine translation scenario. The reference translation has N words (do not consider sentence beginner ‘hat’ and sentence finisher ‘dot’). The machine output also has N words. If the unigram precision is (N-1)/N, then the bigram precision is
  (a) Also (N-1)/N
  (b) At most (N-2)/(N-1)
   (c) At least (N-2)/(N-1) 
  (d) At least (N-3)/(N-1)
  
  Prof. says ONLY option B) is correct- how can I disprove him.
Answers.UserDisplayName: Geeklovenerds
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-11-06T09:31:11.113Z
Answers.Text: MY TAKE-
  In a bigram precision calculation, we are looking at pairs of consecutive words. If all unigrams except one are correct, then the number of correctly predicted bigrams would be N − 2 because you have one less pair of consecutive words due to one unigram being incorrect. Thus option D) is correct.
Answers.UserDisplayName: Geeklovenerds
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-11-06T08:52:34.540Z
Answers.LastActivityDate: 2023-11-06T08:52:34.540Z
Answers.UserDisplayName: Revolucion for Monica
Body: <p>Consider the following machine translation scenario. The reference translation has N words (do not consider sentence beginner ‘hat’ and sentence finisher ‘dot’). The machine output also has N words. If the unigram precision is (N-1)/N, then the bigram precision is
  (a) Also (N-1)/N
  (b) At most (N-2)/(N-1)
  (c) At least (N-2)/(N-1)
  (d) At least (N-3)/(N-1)</p>
  <p>Statement- If the unigram precision is (N-1)/N, then the bigram precision is  At most (N-2)/(N-1).</p>
  <p>Is there any <em><strong>counter example</strong></em> which could prove the above statement wrong having candidate translation, C and reference translation, R.</p>
  <p>I am unable to find any such counter example, kindly please help.</p>
  <p>Also, are there any generalised results.</p>
  <p>Prof Justification:
  The given unigram precision implies that only one word in the candidate translation, C is different from the words in the reference translation, R. Under this circumstance the ‘best’ case of bigram match occurs when the unigram mismatch is at one of the boundaries and the rest of the words occur exactly in the same order as in R. Then only one out of N-2 bigrams does not match, giving rise to the bigram precision of (N-2)/(N-1).
  The worst case of bigram mismatch occurs when the order of words in C is very different from that of R. The no of bigram matches can be even 0, as in
  C: people laugh loudly
  R: men loudly laugh</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-11-09T11:14:48.450Z
Comments.Text: Could you please edit your post to provide more context? What do you know of unigram and bigram precision? What do you mean by that? What's the context?
Comments.UserDisplayName: nbro
Tags: <machine-learning><natural-language-processing><generative-model><n-gram>
Title: If the unigram precision is (N-1)/N, then the bigram precision is :
UserDisplayName: Geeklovenerds
ThreadText: # If the unigram precision is (N-1)/N, then the bigram precision is :
  
  (Asked by: username_0 on 2023-11-06)
  
  Consider the following machine translation scenario. The reference translation has N words (do not consider sentence beginner ‘hat’ and sentence finisher ‘dot’). The machine output also has N words. If the unigram precision is (N-1)/N, then the bigram precision is
  (a) Also (N-1)/N
  (b) At most (N-2)/(N-1)
  (c) At least (N-2)/(N-1)
  (d) At least (N-3)/(N-1)
  
  Statement- If the unigram precision is (N-1)/N, then the bigram precision is At most (N-2)/(N-1).
  
  Is there any ***counter example*** which could prove the above statement wrong having candidate translation, C and reference translation, R.
  
  I am unable to find any such counter example, kindly please help.
  
  Also, are there any generalised results.
  
  Prof Justification:
  The given unigram precision implies that only one word in the candidate translation, C is different from the words in the reference translation, R. Under this circumstance the ‘best’ case of bigram match occurs when the unigram mismatch is at one of the boundaries and the rest of the words occur exactly in the same order as in R. Then only one out of N-2 bigrams does not match, giving rise to the bigram precision of (N-2)/(N-1).
  The worst case of bigram mismatch occurs when the order of words in C is very different from that of R. The no of bigram matches can be even 0, as in
  C: people laugh loudly
  R: men loudly laugh
  
  **Tags:** machine-learning, natural-language-processing, generative-model, n-gram
  > **Comments:**
  > **username_1**: Could you please edit your post to provide more context? What do you know of unigram and bigram precision? What do you mean by that? What's the context?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2023-11-06. Score: 1
  
  Unigram and bigram accuracy is a measure used in machine translation to assess the quality of a machine-generated translation compared to a reference translation.
  
  * Unigram accuracy is the number of words in the candidate translation that exactly match the words in the reference translation, divided by the total number of words in the candidate translation.
  * Bigram accuracy is the number of consecutive word pairs (bigrams) in the candidate's translation that exactly match the bigrams in the reference translation, divided by the total number of bigrams in the candidate's translation.
  
  Now, to understand the statement, suppose we have a candidate translation C with N words and a reference translation R. If the precision of the unigrams is (N-1)/N, this means that all but one of the words in C match those in R.
  
  However, this does not guarantee that the bigram accuracy will be at most (N-2)/(N-1). In fact, there could be cases where the bigram accuracy is much lower. For example, consider the following case:
  
  * C = "La chatte et sur le tapis"
  * R = "Le tapis est sous la chatte".
  
  Here, every word in C is also in R, so the unigram precision is 1. However, none of the pairs of consecutive words in C correspond to a pair of consecutive words in R, so the bigram precision is 0. This is an example that contradicts the given statement.
  
  > **Comments:**
  > **username_3**: Aren't "la chatte" and "le tapis" pairs of consecutive words both in C and R, or is capitalization relevant?  
  > **username_2**: Good question @JaumeOliverLafont I say it is capitalization relevant otherwise it messes up my example ;)  
  > **username_0**: @Revolucion for Monica  Thank you for replying, but can you give an example in English as I am unable to understand the language used by you.  
  > **username_0**: We  need a counter example; saying bigram accuracy is strictly greater to disprove.  
  > **username_0**: This is the Question- Consider the following machine translation scenario. The reference translation has N words (do not consider sentence beginner ‘hat’ and sentence finisher ‘dot’). The machine output also has N words. If the unigram precision is (N-1)/N, then the bigram precision is (a) Also (N-1)/N (b) At most (N-2)/(N-1)  (c) At least (N-2)/(N-1)  (d) At least (N-3)/(N-1)  Prof. says ONLY option B) is correct- how can I disprove him.  
  > **username_0**: MY TAKE- In a bigram precision calculation, we are looking at pairs of consecutive words. If all unigrams except one are correct, then the number of correctly predicted bigrams would be N − 2 because you have one less pair of consecutive words due to one unigram being incorrect. Thus option D) is correct.  
  
  ---
  
  