I am not sure what you mean: you want to remove a certain number of characters in the beginning of every sentence of a document? What kind of document format? If it is a plain text file (ASCII) you can use e.g sed in the terminal:
Bash:
sed 's/...//' file.txt
will remove the first three letters of each line in the document. Depending on your needs the sed command can easily extended, like removing a certain pattern or certain letters.
Thank you. What is the command telling the number of characters. I use terminal, but don’t know coding. Are you saying to insert the specific characters to delete by the ellipsis. I want to delete any number of characters at front.
In order for the document to include sentences on one line I have to insert breaks at end of all sentences, correct? I wish a command could recognize a sentence.
That is a difficult condition to ensure. The simple idea would be to delete whatever number of characters following a period and space. However, you could have false positives (e.g., “The book by Dr. Seuss was…”).
That is a difficult condition to ensure. The simple idea would be to delete whatever number of characters following a period and space. However, you could have false positives (e.g., “The book by Dr. Seuss was…”).
If you have some knowledge beforehand it’s quite easy to exclude “Dr. “ from the processing - as well as define the end of a sentence incl. “!?”. @blackxacto: is this something you need often?
If you have some knowledge beforehand it’s quite easy to exclude “Dr. “ from the processing - as well as define the end of a sentence incl. “!?”. @blackxacto: is this something you need often?