Giter Site home page Giter Site logo

cleanup-case's Introduction

cleanup-case


Currently being rewritten --- when rewrite is complete, it'll be a lot more sensible: will not just crash on bad input, and will use a much more sensible strategy (parsing a html file saved from westlaw interface rather than using OSX-dependent utilities to convert a rtf and then regexing it). For now, you can try the current release, but I've had reports that it's stopped working.

current source (not compiled version, which is still old) can take file saved from westlaw and remove all the westlaw gunk, yielding a html file with text that can be copy-pasted, etc.) text extraction pending (and might involve recompiling jsoup)


Clean up a case downloaded from Westlaw, getting rid of all the junk their downloads included (and the copyrighted stuff to boot), leaving you with just citation, opinion, and footnotes.

The point being to easily be able to edit and distribute cases (i.e. to students) without having to manually clean up garbage.

I can't guarantee that this also keeps one out of heat from Westlaw for distributing publicly. My idea is also to eliminate anything West could have a copyright in, so that what's left is distributable public domain, but I wouldn't be surprised if their terms of service forbid using a to do bulk extraction and distribution. So don't do that, or if you do that, it's at your own risk. I intend this to be used only by professors to extract a handful of cases for easy editing to give to the students in one's own classes.

Mac only.

Requires a java runtime environment, probably recent-ish. If this doesn't work, here are good instructions for installing java.

Instructions

  1. Download the executable file from releases tab here. Set the execute bit (chmod +x cleancase)

  2. Download the case(s) from westlaw in rtf format. Relevant settings: full text, footnotes at end, don't "append" or "include" anything.

  3. Run the program on your file, being sure to escape spaces with backslashes, i.e., ./cleancase Smith\ v \Jones.rtf

  4. Alternatively, if you have a bunch of rtf files in the same directory to convert, download process-rtfs.sh from here, rename as appropriate, set the execute bit, and use that to convert an entire directory.

Your directory will now contain a text file (or a bunch of text files) with the same names, but with .txt instead of .rtf --- and the garbage will be gone.

(c) 2017 Paul Gowder, MIT license.

cleanup-case's People

Contributors

paultopia avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

ryanmccarl

cleanup-case's Issues

Where is the .cleancase command or the releases tab?

Hi there, I am very interested in this project, but the instructions in your README do not seem to match the files available. How can I get this running to try it?

ryan@Ryans-Air ~/dev/lawgraph/src/cleanup-case ±master⚡ » ~/dev/lawgraph/src/cleanup-case/process-rtfs.sh halliburton-test.rtf
/Users/ryan/dev/lawgraph/src/cleanup-case/process-rtfs.sh: line 4: ./cleancase: No such file or directory
ryan@Ryans-Air ~/dev/lawgraph/src/cleanup-case ±master⚡ »

Thank you,
Ryan

Exception in thread "main" java.lang.NullPointerException

$ ./cleancase test.rtf

Exception in thread "main" java.lang.NullPointerException
	at java.util.regex.Matcher.getTextLength(Matcher.java:1283)
	at java.util.regex.Matcher.reset(Matcher.java:309)
	at java.util.regex.Matcher.<init>(Matcher.java:229)
	at java.util.regex.Pattern.matcher(Pattern.java:1093)
	at java.util.regex.Pattern.split(Pattern.java:1206)
	at clojure.string$split.invokeStatic(string.clj:226)
	at clojure.string$split.invoke(string.clj:219)
	at cleanup_case.core$split_opinion.invokeStatic(core.clj:11)
	at cleanup_case.core$split_opinion.invoke(core.clj:9)
	at cleanup_case.core$trees_from_string.invokeStatic(core.clj:29)
	at cleanup_case.core$trees_from_string.invoke(core.clj:27)
	at cleanup_case.core$_main.invokeStatic(core.clj:69)
	at cleanup_case.core$_main.invoke(core.clj:66)
	at clojure.lang.AFn.applyToHelper(AFn.java:154)
	at clojure.lang.AFn.applyTo(AFn.java:144)
	at cleanup_case.core.main(Unknown Source)

I have the latest version of JRE (installed today):

$ java -version
java version "1.8.0_144"
Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.