-
Notifications
You must be signed in to change notification settings - Fork 15
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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); |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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
?
There was a problem hiding this 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=""; | ||
} |
There was a problem hiding this comment.
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.
Implement #2