image image

Law

Law

Hong Kong students develop web browser chatbot that helps you decode complex legislation

Local team wins grand prize at global hackathon held in New York for computer program aided by machine-learning technology

PUBLISHED : Saturday, 12 May, 2018, 6:03pm
UPDATED : Saturday, 12 May, 2018, 10:56pm

Reading legislation can sometimes be difficult without a legal education and training, but a pioneering team of students from two Hong Kong universities is quickly changing that and has garnered global acclaim in the process.

Five students from Chinese University and the University of Hong Kong have developed a computer program to help anyone involved in a legal dispute navigate the challenges of interpreting the law. In the process, the team last month won the grand prize in New York in an event billed as the first Global Legal Hackathon. The finals drew 14 teams, with earlier rounds drawing 40 teams of competitors from 22 countries and 40 cities.

With the help of machine-learning technology, the five students teamed with four developers and created “Decoding Law” by building a browser plug-in that puts legislation into simpler terms for online users. Specific clauses can be located while “chatting” with a chatbot.

The computer program helps with ponderous passages such as this one from the Sale of Goods Ordinance, one of the oldest laws in the city with some clauses predating 1900: “Where the seller sells goods in the course of a business, there is an implied condition that the goods supplied under the contract are of merchantable quality, except that there is no such condition.”

In the program, a primary condition of the legislation is set forth, and in this example, a condition – such as “of merchantable quality” – is isolated before going into its exceptions. The plug-in also lists out where the definition of phrases, such as “companies”, could change in meaning depending on the clause. 

The chatbot function is so far available only in English, but the system for parsing clauses can be used in all local legislation, both in Chinese and English. The project has drawn the interest of some who draft laws.

Even for us law students, you have to repeatedly read the same provision to understand what it really means
Sherman Ho Ho Chi, CUHK law student

Program co-creator Sherman Ho Ho Chi, a Year-Four law student at CUHK, noted that legislation could contain “complex sentence structures”.

“Even for us law students, you have to repeatedly read the same provision to understand what it really means.”

“Chinese is much harder to read than English,” Ho added. “In Chinese the whole sentence is connected, so you can’t always tell which part is the noun and which is the verb.” 

The students stressed that their efforts were not meant to replace the role of lawyers, but to make laws accessible to everyone. For the past three months, they have focused the chatting function on more commonly sought laws, including the Crimes Ordinance, Money Lenders Ordinance, and Gambling Ordinance. 

Program co-creator Alison Li Pui-wun, a Year-Three business and law student at HKU, said unrepresented litigants sometimes did not “really know” the legal issues they were facing.

“You just know the situation you’re in and you have a question,” she added. “But it’s very difficult to find an exact answer online.”

Charge HK$100,000 for Hong Kong judicial reviews — and deny legal aid, group urges

While the students are still pondering their next step following the current pilot stage, their adviser, Brian Tang Wha-Li, who organised the Hackathon’s Hong Kong round, said he could see the program’s potential in terms of commercial use and public good. 

“Law drafting can be convoluted,” Tang said, citing phrases such as “subject to, but expect for the following, and not withstanding” as a few examples.

Legal aid mostly out of reach for Hong Kong’s needy, report finds

The program “not only helps the lay person but also the lawyer, if it’s done properly”, he added. 

Tang believed the legal profession was gradually changing and embracing technology, even in the realm of law drafting. Britain’s Financial Conduct Authority last year launched a similar hackathon, calling it a “tech sprint”, for machine-readable legislation. Tang said the event had inspired innovators in Canada and Australia to hold their own events too.