<commit_before>/***************************************************************************
*   Copyright (C) 2003 by                                                 *
*   <NAME>                                                       *
*                                                                         *
*   Copyright (C) 2003-2005 by                                            *
*   <NAME> (<EMAIL>)                                  *
*                                                                         *
*   This program is free software; you can redistribute it and/or modify  *
*   it under the terms of the GNU General Public License as published by  *
*   the Free Software Foundation; either version 2 of the License, or     *
*   (at your option) any later version.                                   *
***************************************************************************/


#ifndef RECIPEMLIMPORTER_H
#define RECIPEMLIMPORTER_H

#include "baseimporter.h"
#include "datablocks/ingredient.h"
#include "datablocks/recipe.h"

#include <qdom.h>

/** Class to import the RecipeML, XML-based file format.
  * More info at http://www.formatdata.com/recipeml
  *
  * @author <NAME>
  */
class RecipeMLImporter : public BaseImporter
{
public:
	RecipeMLImporter();
	virtual ~RecipeMLImporter();

protected:
	void parseFile( const QString& filename );

private:
	void readRecipemlDirections( const QDomElement& dirs );
	void readRecipemlHead( const QDomElement& head );
	void readRecipemlIng( const QDomElement& ing, Ingredient *ing = 0, const QString &header = QString::null );
	void readRecipemlIngs( const QDomElement& ings );
	void readRecipemlMenu( const QDomElement& menu );
	void readRecipemlSrcItems( const QDomElement& sources );
	void readRecipemlRecipe( const QDomElement& recipe );
	void readRecipemlPreptime( const QDomElement &preptime );
	void readRecipemlQty( const QDomElement &qty, Ingredient &ing );
	void readRecipemlRange( const QDomElement& range, double &range, double &range_offset );

	Recipe recipe;
};

#endif //RECIPEMLIMPORTER_H<commit_msg>match the parameter names in the implementation so there's no conflict<commit_after>/***************************************************************************
*   Copyright (C) 2003 by                                                 *
*   <NAME>                                                       *
*                                                                         *
*   Copyright (C) 2003-2005 by                                            *
*   <NAME> (<EMAIL>)                                  *
*                                                                         *
*   This program is free software; you can redistribute it and/or modify  *
*   it under the terms of the GNU General Public License as published by  *
*   the Free Software Foundation; either version 2 of the License, or     *
*   (at your option) any later version.                                   *
***************************************************************************/


#ifndef RECIPEMLIMPORTER_H
#define RECIPEMLIMPORTER_H

#include "baseimporter.h"
#include "datablocks/ingredient.h"
#include "datablocks/recipe.h"

#include <qdom.h>

/** Class to import the RecipeML, XML-based file format.
  * More info at http://www.formatdata.com/recipeml
  *
  * @author <NAME>
  */
class RecipeMLImporter : public BaseImporter
{
public:
	RecipeMLImporter();
	virtual ~RecipeMLImporter();

protected:
	void parseFile( const QString& filename );

private:
	void readRecipemlDirections( const QDomElement& dirs );
	void readRecipemlHead( const QDomElement& head );
	void readRecipemlIng( const QDomElement& ing, Ingredient *ing_parent = 0, const QString &header = QString::null );
	void readRecipemlIngs( const QDomElement& ings );
	void readRecipemlMenu( const QDomElement& menu );
	void readRecipemlSrcItems( const QDomElement& sources );
	void readRecipemlRecipe( const QDomElement& recipe );
	void readRecipemlPreptime( const QDomElement &preptime );
	void readRecipemlQty( const QDomElement &qty, Ingredient &ing );
	void readRecipemlRange( const QDomElement& range, double &amount, double &amount_offset );

	Recipe recipe;
};

#endif //RECIPEMLIMPORTER_H
{'fraction_non_alphanumeric': 0.14707271010387157, 'fraction_numerical': 0.0066100094428706326, 'mean_word_length': 2.3179326546593577, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 26, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6938264', 'n_tokens_mistral': 1161, 'n_tokens_neox': 1079, 'n_words': 331}