<commit_before>/*

*/
package mandrake

import (
	"log"
	"net/rpc/jsonrpc"
	"github.com/natefinch/pie"
)

type Mandrake struct {
	consumers		chan string
}

func NewMandrake() (*Mandrake, error) {
	return &Mandrake{make(chan string)}, nil
}

func (m *Mandrake) ListenAndServe() {
	p := pie.NewProvider()
	if err := p.RegisterName("mandrake", m); err != nil {
		log.Fatalf("Failed to register plugin: %s", err)
	}

	go p.ServeCodec(jsonrpc.NewServerCodec)
}

func (m *Mandrake) Analyze(fname string, response *string) error {
	log.Printf("Beginning analysis: %s", fname)

	m.consumers <- fname

	return nil
}<commit_msg>update all<commit_after>/*

*/
package mandrake

import (
	"log"
	
	"github.com/hosom/gomandrake/config"
	"github.com/hosom/gomandrake/plugin"
)

type Mandrake struct {
	AnalysisPipeline	chan string
	Input				string
}

func NewMandrake(c config.Config) (*Mandrake, error) {
	return &Mandrake{make(chan string), c.Input}, nil
}

func (m *Mandrake) ListenAndServe() {
	go plugin.CreateListenerAndServe(m.AnalysisPipelinem, m.Input)
}
{'fraction_non_alphanumeric': 0.14108674928503337, 'fraction_numerical': 0.0, 'mean_word_length': 4.645161290322581, 'pattern_counts': {'":': 0, '<': 4, '<?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': '311971', 'n_tokens_mistral': 412, 'n_tokens_neox': 404, 'n_words': 90}