<commit_before>package libxml2

/*
#cgo pkg-config: libxml-2.0
#include <stdbool.h>
#include "libxml/globals.h"
#include "libxml/xpath.h"
#include <libxml/xpathInternals.h>

// Because Go can't do pointer airthmetics...
static inline xmlNodePtr MY_xmlNodeSetTabAt(xmlNodePtr *nodes, int i) {
	return nodes[i];
}

*/
import "C"
import "fmt"

const _XPathObjectType_name = "XPathUndefinedXPathNodeSetXPathBooleanXPathNumberXPathStringXPathPointXPathRangeXPathLocationSetXPathUSersXPathXsltTree"

var _XPathObjectType_index = [...]uint8{0, 14, 26, 38, 49, 60, 70, 80, 96, 106, 119}

func (i XPathObjectType) String() string {
	if i < 0 || i+1 >= XPathObjectType(len(_XPathObjectType_index)) {
		return fmt.Sprintf("XPathObjectType(%d)", i)
	}
	return _XPathObjectType_name[_XPathObjectType_index[i]:_XPathObjectType_index[i+1]]
}

func (x XPathObject) Type() XPathObjectType {
	return XPathObjectType(x.ptr._type)
}

func (x XPathObject) Float64Value() float64 {
	return float64(x.ptr.floatval)
}

func (x XPathObject) BoolValue() bool {
	return C.int(x.ptr.boolval) == 1
}

func (x XPathObject) NodeList() (NodeList, error) {
	nodeset := x.ptr.nodesetval
	if nodeset == nil {
		return nil, ErrInvalidNode
	}

	if nodeset.nodeNr == 0 {
		return nil, ErrInvalidNode<commit_msg>golint<commit_after>package libxml2

/*
#cgo pkg-config: libxml-2.0
#include <stdbool.h>
#include "libxml/globals.h"
#include "libxml/xpath.h"
#include <libxml/xpathInternals.h>

// Because Go can't do pointer airthmetics...
static inline xmlNodePtr MY_xmlNodeSetTabAt(xmlNodePtr *nodes, int i) {
	return nodes[i];
}

*/
import "C"
import "fmt"

const _XPathObjectTypeName = "XPathUndefinedXPathNodeSetXPathBooleanXPathNumberXPathStringXPathPointXPathRangeXPathLocationSetXPathUSersXPathXsltTree"

var _XPathObjectTypeIndex = [...]uint8{0, 14, 26, 38, 49, 60, 70, 80, 96, 106, 119}

func (i XPathObjectType) String() string {
	if i < 0 || i+1 >= XPathObjectType(len(_XPathObjectTypeIndex)) {
		return fmt.Sprintf("XPathObjectType(%d)", i)
	}
	return _XPathObjectTypeName[_XPathObjectTypeIndex[i]:_XPathObjectTypeIndex[i+1]]
}

func (x XPathObject) Type() XPathObjectType {
	return XPathObjectType(x.ptr._type)
}

func (x XPathObject) Float64Value() float64 {
	return float64(x.ptr.floatval)
}

func (x XPathObject) BoolValue() bool {
	return C.int(x.ptr.boolval) == 1
}

func (x XPathObject) NodeList() (NodeList, error) {
	nodeset := x.ptr.nodesetval
	if nodeset == nil {
		return nil, ErrInvalidNode
	}

	if nodeset.nodeNr == 0 {
		return nil, ErrInvalidNode
{'fraction_non_alphanumeric': 0.12712198973549152, 'fraction_numerical': 0.030003947887879984, 'mean_word_length': 5.616187989556136, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 16}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4340855', 'n_tokens_mistral': 1031, 'n_tokens_neox': 957, 'n_words': 209}