I'm working on my graduation thesis and my project consists on the extraction of knowledge from documents containing parsed comments about products or services, using ontologies to indicate the "characteristics" of these products or services, so each can be rated as positive or negative individually, instead of having a single rating for the whole review.
While I can, and if need be I will, tie to a single ontology and specialize my work, the main idea would be to create a framework out of it, so I'd receive the comments on a file and would have the ontology on another file, either OWL or RDF.
The problem with most libraries or frameworks I've seen is that they rely on code generation, while I'd need this to be dynamic, just change the file and read it.
From what I've seen, even SPARQL relies on knowing the ontology structure, so that's also a no-go for me, since I'd need to create queries specialized for each different ontology.
Is there already any library, either for .NET or Python (the languages I consider using for writing my code in) which allows me to work this way with ontologies, or is it up to me to write this? :)
In my opinion the most mature and actively developed RDF library for .Net is dotNetRDF (disclaimer - I am the lead developer)
SemWeb is capable but abandonware, the last update is almost 3 years ago and it doesn't support many of the newer standards that have come along since such as SPARQL 1.1, RDF/JSON, RDFa etc.
If you are interested in running SPARQL queries then SPARQL 1.1 is a key feature because it is far more powerful and comprehensive than the older SPARQL 1.0 specification.
dotNetRDF has full SPARQL 1.1 query support (see SPARQL 1.1 Implementation Reports from the W3C) - note that the Python library you've been recommended RDFLib also has near full SPARQL 1.1 support.
RDFlib is probably the most mature library for working with RDF in python. I have used it for hobby projects, and for those needs (ie. somewhat limited), it has not failed me.
to get the newest stable version.
In C#-land, I would go with SemWeb.NET (as also mentioned in the linked SO post in the comment to your question). I haven't used the library, but Joshua Tauberer, the author, is a pretty capable guy IMO.