You can use a GTF with annotated intervals for the categories you want. For example this one from Ensembl. Use something like unix grep to create files for the categories you are interested. Then use bedtools intersect to get the regions of your BED file overlapping with each category GTF file. Finally use the procedure described here to find total lengths.
Also, if you are only interested on the ratio for each category, you could simplify this by using bedtools jaccard. In this case you would only need your BED file and the categories GTF files.