<commit_before>package main

import (
	"errors"
	"fmt"
	"log"
	"path/filepath"
	"strings"
	"time"

	"github.com/fsnotify/fsnotify"
)

// watch watchers the input paths. The returned Watcher should only be used in
// tests.
func watch(inputPaths, ignoredPaths []string, cmdCh chan<- event) (*fsnotify.Watcher, error) {
	// Creates an Ignorer that just ignores file paths the user
	// specifically asked to be ignored.
	ui, err := createUserIgnorer(ignoredPaths)
	if err != nil {
		return nil, err
	}

	w, err := fsnotify.NewWatcher()
	if err != nil {
		return nil, fmt.Errorf("unable to create watcher: %s", err)
	}

	// Watch user-specified paths and create a set of them for walking
	// later. Paths that are both asked to be watched and ignored by
	// the user are ignored.<commit_msg>fix typo (#13)<commit_after>package main

import (
	"errors"
	"fmt"
	"log"
	"path/filepath"
	"strings"
	"time"

	"github.com/fsnotify/fsnotify"
)

// watch watches the input paths. The returned Watcher should only be used in
// tests.
func watch(inputPaths, ignoredPaths []string, cmdCh chan<- event) (*fsnotify.Watcher, error) {
	// Creates an Ignorer that just ignores file paths the user
	// specifically asked to be ignored.
	ui, err := createUserIgnorer(ignoredPaths)
	if err != nil {
		return nil, err
	}

	w, err := fsnotify.NewWatcher()
	if err != nil {
		return nil, fmt.Errorf("unable to create watcher: %s", err)
	}

	// Watch user-specified paths and create a set of them for walking
	// later. Paths that are both asked to be watched and ignored by
	// the user are ignored.
{'fraction_non_alphanumeric': 0.11118170266836086, 'fraction_numerical': 0.0012706480304955528, 'mean_word_length': 3.5918367346938775, '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': '1704886', 'n_tokens_mistral': 528, 'n_tokens_neox': 506, 'n_words': 197}