<commit_before>﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SPMReader.Convertable;
using SPMReader.Readers;
using SPMReader.Writers;

namespace SPMReader
{
  class Program
  {
    const string USAGE = @"SPEKTRUM SPM File Reader
------------------------
Usage: SPMReader.exe <filename>
";

    static void Main(string[] args)
    {
      if (args == null || args.Length < 1)
        Console.WriteLine(USAGE);

      Reader reader = SPMReaderFactory.CreateReader(args[0]);

      reader.Read();

      object doc = ((SPMReader.Readers.Spektrum.DX18)(reader)).ExportXDocument();

      string output = null;
      if (doc != null)
        output = doc.ToString();

      FileInfo input = new FileInfo(args[0]);
<commit_msg>Added some comments.<commit_after>﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SPMReader.Convertable;
using SPMReader.Readers;
using SPMReader.Writers;

namespace SPMReader
{
  class Program
  {
    const string USAGE = @"SPEKTRUM SPM File Reader
------------------------
Usage: SPMReader.exe <filename>
";

    static void Main(string[] args)
    {
      if (args == null || args.Length < 1)
        Console.WriteLine(USAGE);

      Reader reader = SPMReaderFactory.CreateReader(args[0]);

      reader.Read();

      /*
       * TODO: Need to not use the DX18 here.
       */

      object doc = ((SPMReader.Readers.Spektrum.DX18)(reader)).ExportXDocument();

      string output = null;
      if (doc != null)
        output = doc.ToString();

      FileInfo input = new FileInfo(args[0]);

{'fraction_non_alphanumeric': 0.14210217263652378, 'fraction_numerical': 0.007046388725778039, 'mean_word_length': 2.8639455782312924, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, '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': '5424335', 'n_tokens_mistral': 536, 'n_tokens_neox': 512, 'n_words': 132}