     public func parse(file filename: String, base: String? = nil, handleTriple: @escaping TripleHandler) throws -> Int {
         switch inputSyntax {
         case .ntriples, .turtle:
-            return try serd_parse(file: filename, base: base, handleTriple: handleTriple)
+            return try serd_parse(file: filename, base: base, produceUniqueBlankIdentifiers: produceUniqueBlankIdentifiers, handleTriple: handleTriple)
         default:
             let fileURI = URL(fileURLWithPath: filename)
             let p = RDFXMLParser(base: fileURI.absoluteString)

            if case .blank = subj.type {
                if let t = blankNodes[subj.value] {
                    subj = t
                } else {
                    let id = NSUUID().uuidString
                    let b = Term(value: id, type: .blank)
                    blankNodes[subj.value] = b
                    subj = b
                }
            }
            if case .blank = obj.type {
                if let t = blankNodes[obj.value] {
                    obj = t
                } else {
                    let id = NSUUID().uuidString
                    let b = Term(value: id, type: .blank)
                    blankNodes[obj.value] = b
                    obj = b
                }
            }


}

extension RDFParser {
    public func serd_parse(string: String, produceUniqueBlankIdentifiers: Bool = true, handleTriple: @escaping (Term, Term, Term) -> Void) throws -> Int {
        var baseUri = SERD_URI_NULL
        var base = SERD_NODE_NULL
        
        guard let env = serd_env_new(&base) else { throw RDFParserError.internalError("Failed to construct parser context") }
        base = serd_node_new_uri_from_string(defaultBase, nil, &baseUri)
        
        var context = ParserContext(env: env, handler: handleTriple, produceUniqueBlankIdentifiers: produceUniqueBlankIdentifiers)
        let status = withUnsafePointer(to: &context) { (ctx) -> SerdStatus in
            guard let reader = serd_reader_new(inputSyntax.serdSyntax!, UnsafeMutableRawPointer(mutating: ctx), serd_free_handle, serd_base_sink, serd_prefix_sink, serd_statement_sink, serd_end_sink) else { fatalError() }
            
