Пример #1
0
 public WordCloud(ICircularCloudLayouter layouter, IWordsProcessor wordsProcessor)
 {
     Center              = layouter.Center;
     SizedWords          = new List <ISizedWord>();
     this.layouter       = layouter;
     this.wordsProcessor = wordsProcessor;
 }
Пример #2
0
        public WordsProcessorTests()
        {
            IWordsReader wordsReader = Substitute.For <IWordsReader>();
            var          words       = new Regex(@"\W+", RegexOptions.Compiled).Split("This is a test string. String which contains some words. String starts with some new words. Words made of words. Words containing words".ToLowerInvariant()).ToList();

            wordsReader.GetWords().Returns(words);
            _wordsProcessor = new WordsProcessor(wordsReader);
        }
Пример #3
0
 public Application(IWordAnalyzer wordStatisticGetter, ILayouter layouter, IVisualizer visualizer,
                    Options options,
                    IWriter writer, IWordGetter wordGetter, IWordsProcessor wordsProcessor, ImageFormat imageFormat = null)
 {
     this._wordStatisticGetter = wordStatisticGetter;
     this._layouter            = layouter;
     this._visualizer          = visualizer;
     this._options             = options;
     this._writer         = writer;
     this._wordGetter     = wordGetter;
     this._wordsProcessor = wordsProcessor;
     this._imageFormat    = imageFormat ?? ImageFormat.Jpeg;
 }
Пример #4
0
 public Application(IWordAnalyzer wordStatisticGetter, ILayouter layouter, IVisualizer visualizer,
                    Options options,
                    IWriter writer, IWordGetter wordGetter, IWordsProcessor wordsProcessor, IErrorHandler errorHandler,
                    ImageFormat imageFormat = null)
 {
     _wordStatisticGetter = wordStatisticGetter;
     _layouter            = layouter;
     _visualizer          = visualizer;
     _options             = options;
     _writer         = writer;
     _wordGetter     = wordGetter;
     _wordsProcessor = wordsProcessor;
     _imageFormat    = imageFormat ?? ImageFormat.Jpeg;
     _errorHandler   = errorHandler;
 }
Пример #5
0
 public CounterApp(IFileProcessor fileProcessor, IWordsProcessor wordsProcessor)
 {
     _fileProcessor  = fileProcessor;
     _wordsProcessor = wordsProcessor;
 }
Пример #6
0
 public WordsParser(GeneralWordsReader generalWordsReader, IWordsProcessor wordsProcessor, ITextParsingSettings settings)
 {
     this.generalWordsReader = generalWordsReader;
     this.wordsProcessor     = wordsProcessor;
     this.settings           = settings;
 }