<commit_before><?php
/**
 * Elastica result item
 *
 * Stores all information from a result
 *
 * @category Xodoa
 * @package Elastica
 * @author <NAME> <<EMAIL>>
 */
class Elastica_Result
{
	protected $_hit;

	/**
	 * Constructs a single results object
	 *
	 * @param array $hit Hit data
	 */
	public function __construct(array $hit) {
		$this->_hit = $hit;
	}

	/**
	 * Returns a param from the result hit array
	 *
	 * This function can be used to retriev all data for which not a specific
	 * function exists.
	 * If the param does not exists and empty array is retured
	 *
	 * @param string $name Param name
	 * @return array Result data
	 */
	public function getParam($name) {
		if (isset($this->_hit[$name])) {
			return $this->_hit[$name];
		} else {
			return array();
		}
	}

	/**
	 * Returns the hit id.
	 *
	 * @return string Hit id
	 */
	public function getId() {
		return $this->getParam('_id');
	}

	/**
	 * Returns results type
	 *
	 * @return string Result type
	 */
	public function getType() {
		return $this->getParam('_type');
	}

	/**
	 * Returns list of fields
	 *
	 * @return array Fields list
	 */
	public function getFields() {
		return $this->getParam('fields');
	}

	/**
	 * Returns the index name of the result
	 *
	 * @return string Index name
	 */
	public function getIndex() {
		return $this->getParam('_index');
	}

	/**
	 * Returns the score of the result
	 *
	 * @return float Results score
	 */
	public function getScore() {
		return $this->getParam('_score');
	}

	/**
	 * Returns the raw hit array
	 *
	 * @return array Hit array
	 */
	public function getHit() {
		return $this->_hit;
	}
<commit_msg>Fixed some typos and improved the english<commit_after><?php
/**
 * Elastica result item
 *
 * Stores all information from a result
 *
 * @category Xodoa
 * @package Elastica
 * @author <NAME> <<EMAIL>>
 */
class Elastica_Result
{
	protected $_hit;

	/**
	 * Constructs a single results object
	 *
	 * @param array $hit Hit data
	 */
	public function __construct(array $hit) {
		$this->_hit = $hit;
	}

	/**
	 * Returns a param from the result hit array
	 *
	 * This function can be used to retrieve all data for which a specific
	 * function doesn't exist.
	 * If the param does not exist, an empty array is retured
	 *
	 * @param string $name Param name
	 * @return array Result data
	 */
	public function getParam($name) {
		if (isset($this->_hit[$name])) {
			return $this->_hit[$name];
		} else {
			return array();
		}
	}

	/**
	 * Returns the hit id
	 *
	 * @return string Hit id
	 */
	public function getId() {
		return $this->getParam('_id');
	}

	/**
	 * Returns the type of the result
	 *
	 * @return string Result type
	 */
	public function getType() {
		return $this->getParam('_type');
	}

	/**
	 * Returns list of fields
	 *
	 * @return array Fields list
	 */
	public function getFields() {
		return $this->getParam('fields');
	}

	/**
	 * Returns the index name of the result
	 *
	 * @return string Index name
	 */
	public function getIndex() {
		return $this->getParam('_index');
	}

	/**
	 * Returns the score of the result
	 *
	 * @return float Result score
	 */
	public function getScore() {
		return $this->getParam('_score');
	}

	/**
	 * Returns the raw hit array
	 *
	 * @return array Hit array
	 */
	public function getHit() {
		return $this->_hit;
	}

{'fraction_non_alphanumeric': 0.13242835595776772, 'fraction_numerical': 0.0, 'mean_word_length': 2.905771495877503, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 27, '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': '885924', 'n_tokens_mistral': 1136, 'n_tokens_neox': 1015, 'n_words': 357}