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

Extract style tags and non dialogue words. #5

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

Conversation

MatejMecka
Copy link

Implement #2

Copy link
Owner

@saurabhshri saurabhshri left a comment

Choose a reason for hiding this comment

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

Some changes needed.

srtparser.h Outdated
if(tag[0] == '/'){
tag.erase(0,1);
}
_nonDialogue.push_back(tag);
Copy link
Owner

Choose a reason for hiding this comment

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

This will insert tags into nonDialogue vector.

srtparser.h Outdated
else if(c == '>')
{
c = '~';
countP--;
_styleTagCount++;
if(tag[0] == '/'){
tag.erase(0,1);
Copy link
Owner

Choose a reason for hiding this comment

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

This will not erase complete enclosing tag. If it starts with </, it need not be stored.

Copy link
Owner

Choose a reason for hiding this comment

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

Additionally <font></font> and all such pairs should be counted as a singular unit.

Copy link
Author

Choose a reason for hiding this comment

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

I'm not adding the < and > characthers. I'm ignoring them and only adding till it doesn't equal >. The problem with that approach was the / characther will get added and since i'm not adding < it's /font for example and it'll always be first.

srtparser.h Outdated
int countP = 0;
std::string tag;
Copy link
Owner

Choose a reason for hiding this comment

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

Why is this called tag?

Copy link
Owner

@saurabhshri saurabhshri left a comment

Choose a reason for hiding this comment

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

Also please delete extra newlines.

srtparser.h Outdated
else{
_styleTag.push_back(tag);
tag="";
}
Copy link
Owner

Choose a reason for hiding this comment

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

This if else block can be simplified to a single if statement.

@MatejMecka MatejMecka closed this Mar 11, 2018
@MatejMecka MatejMecka reopened this Oct 27, 2018
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.

None yet

2 participants