<commit_before>import { Component, ViewEncapsulation } from '@angular/core';

@Component({
  templateUrl: './categoryForm.component.html',
  styleUrls: ['./categoryForm.component.scss'],
  encapsulation: ViewEncapsulation.None
})
export class CategoryFormComponent {
  subjects: { value: string, viewValue: string }[] = [
    {value: 'language', viewValue: 'Українська мова'},
    {value: 'literature', viewValue: 'Українська література'}
  ];

  subject: string;
  category: string;

  onSubmit() {

  }
}<commit_msg>Create object with form data<commit_after>import { Component, ViewEncapsulation } from '@angular/core';

@Component({
  templateUrl: './categoryForm.component.html',
  styleUrls: ['./categoryForm.component.scss'],
  encapsulation: ViewEncapsulation.None
})
export class CategoryFormComponent {
  subjects: { value: string, viewValue: string }[] = [
    {value: 'language', viewValue: 'Українська мова'},
    {value: 'literature', viewValue: 'Українська література'}
  ];

  subject: string;
  category: string;

  onSubmit(): {} {
    if (this.subject != undefined) {
      return {
        subject: this.subject,
        category: this.category
      };
    }

    return {
      subject: this.category
    };
  }
}
{'fraction_non_alphanumeric': 0.14343598055105347, 'fraction_numerical': 0.0, 'mean_word_length': 3.94, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6956151', 'n_tokens_mistral': 380, 'n_tokens_neox': 398, 'n_words': 85}