• Refine Query
  • Source
  • Publication year
  • to
  • Language
  • 1
  • Tagged with
  • 1
  • 1
  • 1
  • 1
  • 1
  • 1
  • 1
  • 1
  • 1
  • 1
  • 1
  • 1
  • 1
  • 1
  • 1
  • About
  • The Global ETD Search service is a free service for researchers to find electronic theses and dissertations. This service is provided by the Networked Digital Library of Theses and Dissertations.
    Our metadata is collected from universities around the world. If you manage a university/consortium/country archive and want to be added, details can be found on the NDLTD website.
1

Neural Cleaning of Swedish Textual Data : Using BERT-based methods for Token Classification of Running and Non-Running Text / Rensning av svensk textdata med hjälp av neurala nätverk : Token-klassificering av text som löpande, eller inte löpande, med BERT-baserade metoder

Ericsson, Andreas January 2023 (has links)
Modern natural language processing methods requires big textual datasets to function well. A common method is to scrape the internet to acquire the needed data. This does, however, come with the issue that some of the data may be unwanted – for instance, spam websites. As a consequence, the datasets become larger and thus increasing training cost. This thesis defines text as written by humans as running text, and automatically generated texts as non-running text. The goal of the thesis was then to fine-tune the KB-BERT model, BERT pre-trained on Swedish textual data, to classify tokens as either running or non-running text. To do this, texts from the Swedish C4 corpus were manually annotated. In total, 1000 texts were annotated and used for the fine-tuning phase. As the annotated data was a bit skewed in favour of running-text, it was also tested how using class weights to balance the training data affected the end results. When using the BERT-based method with no class weights, the method got a precision and recall for non-running text of 95.13% and 78.84%, and for running text the precision and recall was 83.87% and 96.46%. When using class weights to balance the data, the precision and recall for non-running text were 90.08% and 87.4%, and for running text 89.36% and 92.40%. From these results, one can see that it is possible to alter how strict the model is depending on one’s needs, for instance, purpose and amount of available textual data by using class weights. The number of samples in the manually annotated dataset is too small to make a definite conclusion from, but this thesis shows that using a BERT-based method has the potential to handle problems such as these, as it produced much better results when compared to a more simple baseline-method. Therefore, further research in this area of natural language processing is encouraged. / Moderna språkteknologi-metoder behöver i regel en stor mängd data i form av text för att fungera väl. En vanlig metod för att samla ihop tillräckliga datamängder är att använda tekniker såsom webbskrapning. Detta leder dock i regel till problemet att man även får med oönskad data – till exempel spamhemsidor. Detta leder till att datamängden blir större, vilket innebär en ökad kostnad att träna modellen. Denna avhandling definierar text som löpande ifall den är skriven av människor, och automatiskt genererad text som icke-löpande. Målet med denna avhandling var sedan att finjustera KB-BERT, en BERT-modell som tidigare tränats med svensk text-data, för att klassificera tokens som antingen löpande eller icke-löpande text. För att genomföra detta så annoterades 1000 texter från den svenska delen av C4-korpuset manuellt som sedan användes för att finjustera KB-BERT. Då den annoterade datan innehöll mer löpande än icke-löpande text testades det också hur resultatet påverkades av att använda vikter för att jämna ut förhållandet. När den BERT-baserade metoden utan vikter användes så uppnåddes ett precision och recall för icke-löpande text till 95.13% respektive 78.84%, och för löpande text var precision och recall 83.87% respektive 96.46%. När vikter användes för att balansera datan, så var precision och recall för icke-löpande text 90.08% respektive 87.4%, och för löpande text 89.36% respektive 92.40%. Från dessa resultat kan man tydligt se att det är möjligt att påverka hur strikt modellen är. Hur strikt man vill att modellen ska vara kan variera beroende på, till exempel, ens syfte och hur mycket data man har tillgång till. Dock, det är viktigt att notera att mängden manuellt annoterad data är för liten för att kunna nå en definitiv slutsats. Däremot så visar denna avhandling att BERT-baserade metoder har potentialen att kunna användas för problem likt denna avhandlings frågeställning då den uppnådde mycket bättre resultat än den simplare metod de jämfördes med. Således uppmuntras fortsatt forskning inom detta område av språkteknologi.

Page generated in 0.0504 seconds