<commit_before>/*
 * This class creates c++ like stream from file descriptor
 */

#ifndef _FDSTREAM_
#define _FDSTREAM_

#include <iostream>
#include <string>

#if defined(__GLIBCXX__) || defined(__GLIBCPP__)
#include <ext/stdio_filebuf.h>

#define BUFFER_SIZE (32768)

namespace MosesTuning
{

class _fdstream
{<commit_msg>add comment for future work on making fdstream more portable /<NAME><commit_after>/*
 * This class creates c++ like stream from file descriptor
 * It uses gcc-specific functions, therefore is not portable
 *
 * <NAME> reckons that it can be replaced with Boost's io::stream_buffer
 *
 */


#ifndef _FDSTREAM_
#define _FDSTREAM_

#include <iostream>
#include <string>

#if defined(__GLIBCXX__) || defined(__GLIBCPP__)
#include <ext/stdio_filebuf.h>

#define BUFFER_SIZE (32768)

namespace MosesTuning
{

class _fdstream
{
{'fraction_non_alphanumeric': 0.0995260663507109, 'fraction_numerical': 0.011848341232227487, 'mean_word_length': 5.401515151515151, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '7508577', 'n_tokens_mistral': 285, 'n_tokens_neox': 274, 'n_words': 88}