Answers.Body: <p>Since sport commentaries are a fairly restricted domain, and the language does not vary much, I would go for a canned text approach.</p>
  <p>Analyse what kind of events you get, and what variables you're dealing with. Then write some template sentences with placeholders for the variables. The more you write for the same data, the more varied your text will be. You could then structure them by pre-conditions, such as a goal that equalises a previous goal, as you will want to say something different than if it was a repeated goal by the same team.</p>
  <p>You could probably look at interactive fiction for tools, such as <a href="https://twinery.org/" rel="nofollow noreferrer">Twine</a> -- effectively you treat your sporting event like an interactive story, that is driven by what happens in the sporting event you are describing.</p>
  <p>You will have the effort of writing the templates, but in return your output text will be of higher quality, and you have more control over what is generated than if you were using a machine learning approach.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-12-28T15:46:47.370Z
Answers.Text: Thanks for answering! I'll consider your idea for sure. Nevertheless, if I were to consider a deep learning approach, do you think that this can be accomplished without relying on building a dataset for all sports? I still consider than fine-tuning a model would be the optimal way on terms of time and all based on my idea posted in the question
Answers.UserDisplayName: adrià espejo cubero
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-12-28T16:13:00.657Z
Answers.Text: There is no free lunch -- I doubt that you will get any good results without putting in your domain knowledge.
Answers.UserDisplayName: Oliver Mason
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-12-28T16:44:30.417Z
Answers.Text: Thanks, Oliver. I just wanted to make sure of that dependency. Cheers.
Answers.UserDisplayName: adrià espejo cubero
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-12-28T11:34:28.560Z
Answers.LastActivityDate: 2021-12-28T11:34:28.560Z
Answers.UserDisplayName: Oliver Mason
Body: <p>I am trying to develop a &quot;simple&quot; announcer for sports segments that mainly consists of events like goals, fouls, substitutions, and many other events that could happen in many sports. The idea is that I already have key info like the player who does the action, the location in the court, the time that it takes place, and more extra info. I also have information like the sport being played and the type of event, so this task is purely focused on NLG.</p>
  <p>The naïve idea that I had was to extract commentaries of soccer, which can be found on so many websites, and extract the key info of these commentaries that will act as the ground truth in the model for getting the input, i.e.,:</p>
  <p><strong>['football', 'goal', 'Bob', 'fourth minute'] -&gt; Goal! that was a nice goal from Bob in the fourth minute of the match.</strong></p>
  <p>I would say that the first two words are being used for steering the model to generate sports according to phrases (a cricket player kicking the ball doesn't make sense).</p>
  <p>The comments generated by the fine-tuned model on this input-output are acceptable.</p>
  <p>The problem is that I have to build a dataset for many sports (or at least 2 with the same quality as soccer ones like in Flashscore) and I can't find any.</p>
  <p>I have also been looking for Plug and Play methods to generate sentences.</p>
  <p>What do you think? Is fine-tuning a must-do in this situation or can it be thought of in another way?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-12-28T09:00:25.067Z
Comments.Text: Hello. Could you please put your **specific** question in the title? From the title, it seems that you want to generate comments, but it's not specific enough.
Comments.UserDisplayName: nbro
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-12-28T09:03:48.870Z
Comments.Text: I am not sure you need deep learning. The main question is how do you represent the sports events inside the computer. Do you have some frames? See [these slides](https://www.cs.jhu.edu/~phi/ai/slides/lecture-knowledge-representation.pdf). You could be interested by [RefPerSys](http://refpersys.org/) whose objects are frames
Comments.UserDisplayName: Basile Starynkevitch
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-12-28T09:09:39.077Z
Comments.Text: Your question should tell what is the input of your system? Do you parse English written text (e.g. coming from Reuters)? Do you have a video camera, with your software "understanding" the event?
Comments.UserDisplayName: Basile Starynkevitch
Tags: <machine-learning><deep-learning><natural-language-processing>
Title: Generating automatic sports commentary (NLG)
UserDisplayName: adrià espejo cubero
ThreadText: # Generating automatic sports commentary (NLG)
  
  (Asked by: username_0 on 2021-12-28)
  
  I am trying to develop a "simple" announcer for sports segments that mainly consists of events like goals, fouls, substitutions, and many other events that could happen in many sports. The idea is that I already have key info like the player who does the action, the location in the court, the time that it takes place, and more extra info. I also have information like the sport being played and the type of event, so this task is purely focused on NLG.
  
  The naïve idea that I had was to extract commentaries of soccer, which can be found on so many websites, and extract the key info of these commentaries that will act as the ground truth in the model for getting the input, i.e.,:
  
  **['football', 'goal', 'Bob', 'fourth minute'] -> Goal! that was a nice goal from Bob in the fourth minute of the match.**
  
  I would say that the first two words are being used for steering the model to generate sports according to phrases (a cricket player kicking the ball doesn't make sense).
  
  The comments generated by the fine-tuned model on this input-output are acceptable.
  
  The problem is that I have to build a dataset for many sports (or at least 2 with the same quality as soccer ones like in Flashscore) and I can't find any.
  
  I have also been looking for Plug and Play methods to generate sentences.
  
  What do you think? Is fine-tuning a must-do in this situation or can it be thought of in another way?
  
  **Tags:** machine-learning, deep-learning, natural-language-processing
  > **Comments:**
  > **username_1**: Hello. Could you please put your **specific** question in the title? From the title, it seems that you want to generate comments, but it's not specific enough.  
  > **username_2**: I am not sure you need deep learning. The main question is how do you represent the sports events inside the computer. Do you have some frames? See [these slides](https://www.cs.jhu.edu/~phi/ai/slides/lecture-knowledge-representation.pdf). You could be interested by [RefPerSys](http://refpersys.org/) whose objects are frames  
  > **username_2**: Your question should tell what is the input of your system? Do you parse English written text (e.g. coming from Reuters)? Do you have a video camera, with your software "understanding" the event?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_3 on 2021-12-28. Score: 2
  
  Since sport commentaries are a fairly restricted domain, and the language does not vary much, I would go for a canned text approach.
  
  Analyse what kind of events you get, and what variables you're dealing with. Then write some template sentences with placeholders for the variables. The more you write for the same data, the more varied your text will be. You could then structure them by pre-conditions, such as a goal that equalises a previous goal, as you will want to say something different than if it was a repeated goal by the same team.
  
  You could probably look at interactive fiction for tools, such as [Twine](https://twinery.org/) -- effectively you treat your sporting event like an interactive story, that is driven by what happens in the sporting event you are describing.
  
  You will have the effort of writing the templates, but in return your output text will be of higher quality, and you have more control over what is generated than if you were using a machine learning approach.
  
  > **Comments:**
  > **username_0**: Thanks for answering! I'll consider your idea for sure. Nevertheless, if I were to consider a deep learning approach, do you think that this can be accomplished without relying on building a dataset for all sports? I still consider than fine-tuning a model would be the optimal way on terms of time and all based on my idea posted in the question  
  > **username_3**: There is no free lunch -- I doubt that you will get any good results without putting in your domain knowledge.  
  > **username_0**: Thanks, Oliver. I just wanted to make sure of that dependency. Cheers.  
  
  ---
  
  