Conversation
| @@ -0,0 +1,16 @@ | |||
| <Project Sdk="Microsoft.NET.Sdk"> | |||
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
|
|
||
| namespace TagsCloudContainer.CLI | ||
| { | ||
| public static class CommandLineArgs |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
| public IEnumerable<(string, int)> GetAnalyzedText() | ||
| { | ||
| foreach (KeyValuePair<string, int> pair in wordFrequency) | ||
| { | ||
| yield return (pair.Key, pair.Value); | ||
| } | ||
| } |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
| } | ||
| } | ||
|
|
||
| public void SaveToFile(string filePath) |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
| public abstract void Analyze(string text); | ||
| public abstract IEnumerable<(string, int)> GetAnalyzedText(); |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
| foreach (var previous in Cloud) | ||
| { | ||
| if (rectangle.IntersectsWith(previous)) | ||
| return false; | ||
| } | ||
|
|
||
| return true; |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
|
|
||
| namespace TagsCloudVisualization | ||
| { | ||
| public class TagsCloudLayouter |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
|
|
||
| private readonly Graphics graphics; | ||
| private readonly Image image; | ||
| public ICollection<Rectangle> Cloud { get; private set; } |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
| foreach (var word in words) | ||
| { | ||
| var font = new Font(drawingSettings.FontFamily, drawingSettings.FontSize + word.Item2); | ||
| var size = (graphics.MeasureString(word.Item1, font) + new SizeF(1, 0)).ToSize(); ; |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
| var rect = PutNextRectangle(textImage.Size); | ||
| Cloud.Add(rect); | ||
|
|
||
| graphics.DrawString(textImage.Text, textImage.Font, brush, rect); |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
…ider Случайное нормальное распределение.
| return !Cloud.Any(x => x.IntersectsWith(rectangle)); | ||
| } | ||
|
|
||
| internal Rectangle PutNextRectangle(Size rectangleSize) |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
There was a problem hiding this comment.
Раньше на него был тест, вернул в private
| { | ||
| public interface ITextReader | ||
| { | ||
| public abstract string ReadText(string filePath); |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
| { | ||
| public class FrequencyAnalyzer : IAnalyzer | ||
| { | ||
| //private readonly TextPreprocessing preprocessor; |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
| Rectangle rectangle; | ||
| bool placingIsCorrect; | ||
|
|
||
| var enumerator = pointsProvider.Points().GetEnumerator(); |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
init: начальная структура программы