Dear friends, colleagues and fellow users of Espacenet
As part of my bachelor thesis I spent quite some time analysing the CSV files that Espacenet produces.
This was for several reasons. Mostly I wanted to count the number of patents issued per specific year to get a feel for the maturity of a field, and also to create my own graphs with spreadsheet programs. The graphs produced by the Espacenet website are useful, but sometimes, if there is a large number of entries, not everything is reflected. Plus, being able to create the graphs in different styles always looks good.
In short, I have created a tool that parses the CSV files. It's written in BASH, which means it works for any flavor of Linux with a modern Bash shell in it (post 4.0). It might work in mac products, because they use Bash too, but it hasn't been tested. (tell me if you do!)
It is also my first piece of open-source software!
What it does
It parses every single Espacenet CSV file present in the same directory as the script and creates, at least, another CSV file with the results. The results are, essentially, a hit count of the requested fields. So, for instance, if you are checking for titles you get a count of how many times a specific title appears.
Additionally it can create UNIX formatted CSV files that are copies of the DOS-formatted CSV files that Espacenet produces.
The CSV files that it produces are UNIX and DOS (ie. Windows) compatible.
For each field, my script can disaggregate. For titles it can count the apparitions of each title, or the apparitions of each word in the titles. For CPC codes, the apparition of each individual CPC code or of each group of CPC codes. You get the drift.
For dates (publication dates, priority date etc) it can record the month and year or only the year.
What it cannot do
It cannot disaggregate the applicants and it is unreliable when disaggregating the inventors. This is because, often, they are written in the entry field without any mark that separates the individual inventors/applicants. For instance, some inventors are listed as "Carey Mahoney [US] Tomoko Nogata [JP]", so the script can tell where a name ends and the next starts. Some entries, however, are written "Eric Lassard Carl Proctor", and my script cannot tell, hence, doesn't disaggregate.
Also, some date fields contain several dates. I could extend the script, but I have decided not to do it because I haven't sat down and studied why there are more than one date. I could make the script disaggregate those dates, but I do not touch data whose underlying logic I don't understand, because that opens the door to the subtle corruption of data, and apparent artifacts from the data that aren't there.
How does it work
Usage: ./EPOParser.sh -aCdeiIptu (minimum disaggregation) or -axCxdyeyixIxpytxu (maximum disaggregation) and any option in between.
-t Count the times specific title appears.
-i Count the times each inventor or group of inventors appears.
-a Count the times an applicant or group of applicants appears.
-I Count the times a specific grouping of IPC numbers appears.
-C Count the times a specific grouping of CPC numbers appears.
The dissagregation modifier "x" after each of the above options tries to split the entries. -Ix, for instance, it will count the number of times each IPC number appears, instead of the groupings of IPC numbers in each patent. -tx it will count individual words in titles, and not the appearance of each full title.
The "x" option does not work with the -a option, and is unreliable with the -i options. The reason is that there is no consistent pattern to dissagreggate inventor and applicant names.
-d Count how many patents were published each month of each year.
-p Count the priority dates.
-e Count the earliest publication dates.
The modifier "y" after a date option eliminates the month and counts patents per year.
Exceptions: Some fields of priority or earliest publication dates contain more than one date, which may muddy the results.
-u Provides a copy of the original, DOS-formatted Espacenet files that is UNIX-formatted, for easier CSV parsing.
--help Displays this help text and exits.
--version Displays version information and exits.
It is written with many idiomatic bashisms, it might not work in other shells and it certainly does not work in DASH.
GNU GPL V3.0, so you can use it and modify it as you please. The code is exhaustively commented to help that.
Remember attribution, and remember that you cannot use my code for any closed-source software!
Yeah fine, great, but where do I get it?
On my website. Click here!
How do I use it?
[*] Go to my website, copy the source code, paste it in a document.
[*] Open that directory in the shell. Google it if you don't know what I am talking about. This is unusual but don't be afraid, you will not break your computer doing this!
[*] Type 'chmod 755 EPOParser.sh' in the shell (without the quotes of course) and press enter. This marks the script as an executable. (use whatever filename you used, if you used a different one).
[*] Place the Espacenet epo files in the same directory and enter the instructions, like the usage function shows. For instance: ' ./EPOParser.sh -cCtxdyu '. Or type ./EPOParser.sh --help to read the usage function.
Leaving options out is no big deal.
[*] If you are not used to work with linux, remember that you need to write './' before the name of the script and the options. Or just look for a guide on how to run scripts.
I hope you find it useful! Comments and criticism are welcome.
2 posts • Page 1 of 1
Your analysis is truly detailed and valuablegeometry dash lite. Each individual will have a different way of writing. But through an outline, there will be good implementation orientation. I like the practical value you provide.
Last edited by silurianultra on Thu Nov 30, 2023 6:01 am, edited 1 time in total.