<commit_before>import { createValueModel } from '../../kit'
// import TranslationCollectionModel from './TranslationCollectionModel'
import FigureCollectionModel from './FigureCollectionModel'
import TableFigureCollectionModel from './TableFigureCollectionModel'
// import TableCollectionModel from './TableCollectionModel'
import ArticleRecordModel from './ArticleRecordModel'

/**
 * This is an artificial Model used to control the content displayed in the Metadata view.
 */
export default class MetadataModel {
  constructor (api) {
    this._api = api
    let doc = api.getDocument()
    this._sections = [
      { name: 'authors', model: createValueModel(api, ['metadata', 'authors']) },
      { name: 'editors', model: createValueModel(api, ['metadata', 'editors']) },
      { name: 'groups', model: createValueModel(api, ['metadata', 'groups']) },
      { name: 'organisations', model: createValueModel(api, ['metadata', 'organisations']) },
      { name: 'awards', model: createValueModel(api, ['metadata', 'awards']) },
      { name: 'keywords', model: createValueModel(api, ['metadata', 'keywords']) },
      { name: 'subjects', model: createValueModel(api, ['metadata', 'subjects']) },
      // HACK: 'article-record' is a fake model
      // TODO: we should allow sections without model and create the section via name
      { name: 'article-record', model: new ArticleRecordModel(api) },
      { name: 'figures', model: new FigureCollectionModel(api) },
      { name: 'tables', model: new TableFigureCollectionModel(api) },
      { name: 'references', model: createValueModel(api, ['article', 'references']) },
      { name: 'footnotes', model: createValueModel(api, ['article', 'footnotes']) }
    ]
  }

  getSections () {
    return this._sections
  }<commit_msg>Silence.<commit_after>import { createValueModel } from '../../kit'
// import TranslationCollectionModel from './TranslationCollectionModel'
import FigureCollectionModel from './FigureCollectionModel'
import TableFigureCollectionModel from './TableFigureCollectionModel'
// import TableCollectionModel from './TableCollectionModel'
import ArticleRecordModel from './ArticleRecordModel'

/**
 * This is an artificial Model used to control the content displayed in the Metadata view.
 */
export default class MetadataModel {
  constructor (api) {
    this._api = api
    this._sections = [
      { name: 'authors', model: createValueModel(api, ['metadata', 'authors']) },
      { name: 'editors', model: createValueModel(api, ['metadata', 'editors']) },
      { name: 'groups', model: createValueModel(api, ['metadata', 'groups']) },
      { name: 'organisations', model: createValueModel(api, ['metadata', 'organisations']) },
      { name: 'awards', model: createValueModel(api, ['metadata', 'awards']) },
      { name: 'keywords', model: createValueModel(api, ['metadata', 'keywords']) },
      { name: 'subjects', model: createValueModel(api, ['metadata', 'subjects']) },
      // HACK: 'article-record' is a fake model
      // TODO: we should allow sections without model and create the section via name
      { name: 'article-record', model: new ArticleRecordModel(api) },
      { name: 'figures', model: new FigureCollectionModel(api) },
      { name: 'tables', model: new TableFigureCollectionModel(api) },
      { name: 'references', model: createValueModel(api, ['article', 'references']) },
      { name: 'footnotes', model: createValueModel(api, ['article', 'footnotes']) }
    ]
  }

  getSections () {
    return this._sections
  }
{'fraction_non_alphanumeric': 0.1495884189611127, 'fraction_numerical': 0.0, 'mean_word_length': 4.331316187594553, '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': '4876297', 'n_tokens_mistral': 952, 'n_tokens_neox': 932, 'n_words': 281}