Lexical Analysis Program
Name Spaces
A most common practice is to preface types and functions supplied by the 
Standard Template Library, sometimes known as the Standard Library with
std:: rather than ignoring names spaces by the statement

using namespace std;


This will become quite helpful as the problems and code become more complex
and you need to include other name spaces. Some languages such as C don't
support namespaces, however, C++ does and it is quite a useful feature.
More complex programs may use multiple name spaces and each one of these
name spaces can contain a definition for functions such as sort() or
find_if(), or overrides on operators such as &lt;&lt;. You may even need to
write your own sort() or find(). Using std::sort allows you not to
create your own name space when you write your own sort() with the same
arguments.

Initialization of Empty Containers
There is no need for the empty braces on this line:

    vector&lt;int&gt; indices = {};


The vector container class has a constructor that will initialize an empty
vector properly.

    vector&lt;int&gt; indices;


Use the Features of the Container Classes and the Standard Template Library
You may find this website useful for learning all of the features a 
particular container class or the standard library.

There are definitely some functions you could be using, such as 
std::find(), std::find_if(), std::count_if() and std::string::substr() that could definitely shorten the code.

It might be wise to investigate std::map as well for counting words.

GOTO
There are almost always ways to avoid using goto in C++. In rare cases
goto may be appropriate for error handling, more so in C than in 
C++ because C++ has try{}/catch{} and exceptions. 

In the following code there is really no reason to use a goto:

vector&lt;string&gt; deleteNumbers(const vector&lt;string&gt;&amp; data) {
    vector&lt;string&gt; tr = {};
    for (unsigned int i = 0; i &lt; data.size(); i++) {
        for (char c: data[i]) {
            if (string("0123456789").find(c) == -1) continue;
            else goto mainLoop;
        }
        tr.push_back(data[i]);
        mainLoop: continue;
    }
    return tr;
}