Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Алешев Руслан #188

Open
wants to merge 23 commits into
base: master
Choose a base branch
from
Open

Conversation

artBETEP
Copy link

init: начальная структура программы

@@ -0,0 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">

This comment was marked as off-topic.

This comment was marked as off-topic.


namespace TagsCloudContainer.CLI
{
public static class CommandLineArgs

This comment was marked as resolved.

Comment on lines 29 to 35
public IEnumerable<(string, int)> GetAnalyzedText()
{
foreach (KeyValuePair<string, int> pair in wordFrequency)
{
yield return (pair.Key, pair.Value);
}
}

This comment was marked as resolved.

}
}

public void SaveToFile(string filePath)

This comment was marked as resolved.

Comment on lines 5 to 6
public abstract void Analyze(string text);
public abstract IEnumerable<(string, int)> GetAnalyzedText();

This comment was marked as resolved.

Comment on lines 97 to 103
foreach (var previous in Cloud)
{
if (rectangle.IntersectsWith(previous))
return false;
}

return true;

This comment was marked as resolved.


namespace TagsCloudVisualization
{
public class TagsCloudLayouter

This comment was marked as resolved.


private readonly Graphics graphics;
private readonly Image image;
public ICollection<Rectangle> Cloud { get; private set; }

This comment was marked as resolved.

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.

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.

return !Cloud.Any(x => x.IntersectsWith(rectangle));
}

internal Rectangle PutNextRectangle(Size rectangleSize)

This comment was marked as resolved.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Раньше на него был тест, вернул в private

{
public interface ITextReader
{
public abstract string ReadText(string filePath);

This comment was marked as resolved.

{
public class FrequencyAnalyzer : IAnalyzer
{
//private readonly TextPreprocessing preprocessor;

This comment was marked as resolved.

Rectangle rectangle;
bool placingIsCorrect;

var enumerator = pointsProvider.Points().GetEnumerator();

This comment was marked as resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants