<commit_before>﻿using System;
using System.IO;

using ApprovalTests;
using ApprovalTests.Reporters;
using FluentAssertions;
using Xunit;

using Grobid.NET;
using org.apache.log4j;
using org.grobid.core;

namespace Grobid.Test
{
    [UseReporter(typeof(DiffReporter))]
    public class GrobidTest
    {
        static GrobidTest()
        {
            BasicConfigurator.configure();
            org.apache.log4j.Logger.getRootLogger().setLevel(Level.DEBUG);
        }

        [Fact]
        [Trait("Test", "EndToEnd")]
        public void ExtractTest()
        {
            var binPath = Environment.GetEnvironmentVariable("PDFTOXMLEXE");
            org.apache.log4j.Logger.getRootLogger().info("PDFTOXMLEXE=" + binPath);

            var factory = new GrobidFactory(
                "grobid.zip",
                binPath,
                Directory.GetCurrentDirectory());

            var grobid = factory.Create();
            var result = grobid.Extract(@"essence-linq.pdf");

            result.Should().NotBeEmpty();
            Approvals.Verify(result);
        }

        [Fact]
        public void Test()
        {
            var x = GrobidModels.NAMES_HEADER;
            x.name().Should().Be("NAMES_HEADER");
            x.toString().Should().Be("name/header");
        }
    }
}
<commit_msg>Reduce logging level to ERROR<commit_after>﻿using System;
using System.IO;

using ApprovalTests;
using ApprovalTests.Reporters;
using FluentAssertions;
using Xunit;

using Grobid.NET;
using org.apache.log4j;
using org.grobid.core;

namespace Grobid.Test
{
    [UseReporter(typeof(DiffReporter))]
    public class GrobidTest
    {
        static GrobidTest()
        {
            BasicConfigurator.configure();
            org.apache.log4j.Logger.getRootLogger().setLevel(Level.ERROR);
        }

        [Fact]
        [Trait("Test", "EndToEnd")]
        public void ExtractTest()
        {
            var binPath = Environment.GetEnvironmentVariable("PDFTOXMLEXE");

            var factory = new GrobidFactory(
                "grobid.zip",
                binPath,
                Directory.GetCurrentDirectory());

            var grobid = factory.Create();
            var result = grobid.Extract(@"essence-linq.pdf");

            result.Should().NotBeEmpty();
            Approvals.Verify(result);
        }

        [Fact]
        public void Test()
        {
            var x = GrobidModels.NAMES_HEADER;
            x.name().Should().Be("NAMES_HEADER");
            x.toString().Should().Be("name/header");
        }
    }
}

{'fraction_non_alphanumeric': 0.11417769376181475, 'fraction_numerical': 0.001890359168241966, 'mean_word_length': 1.8029661016949152, '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': '496836', 'n_tokens_mistral': 771, 'n_tokens_neox': 745, 'n_words': 128}