<commit_before>// Copyright 2017 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package paths

import "strings"

// This was lovingly lifted from src/cmd/go/pkg.go in Go's code.
func IsStandardImportPath(path string) bool {
	i := strings.Index(path, "/")
	if i < 0 {
		i = len(path)
	}

	return !strings.Contains(path[:i], ".")
}
<commit_msg>better IsStandardImportPath doc<commit_after>// Copyright 2017 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package paths

import "strings"

// IsStandardImportPath indicates whether the provided path should be considered
// part of the standard library by checking the first path element for a '.'.
//
// This was lovingly lifted from src/cmd/go/pkg.go in Go's code.
func IsStandardImportPath(path string) bool {
	i := strings.Index(path, "/")
	if i < 0 {
		i = len(path)
	}

	return !strings.Contains(path[:i], ".")
}

{'fraction_non_alphanumeric': 0.11005692599620494, 'fraction_numerical': 0.009487666034155597, 'mean_word_length': 3.567099567099567, 'pattern_counts': {'":': 0, '<': 5, '<?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': '3087682', 'n_tokens_mistral': 331, 'n_tokens_neox': 313, 'n_words': 132}